feat(backend): remove avatar_source field, change avatar_urls on member
This commit is contained in:
parent
5679dbb657
commit
85a061ebc5
|
@ -14,7 +14,7 @@ type Member struct {
|
|||
UserID xid.ID
|
||||
Name string
|
||||
Bio *string
|
||||
AvatarURL *string
|
||||
AvatarURLs []string `db:"avatar_urls"`
|
||||
Links []string
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ type User struct {
|
|||
DisplayName *string
|
||||
Bio *string
|
||||
|
||||
AvatarSource *string
|
||||
AvatarURLs []string `db:"avatar_urls"`
|
||||
Links []string
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ type GetMemberResponse struct {
|
|||
ID xid.ID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Bio *string `json:"bio"`
|
||||
AvatarURL *string `json:"avatar_url"`
|
||||
AvatarURLs []string `json:"avatar_urls"`
|
||||
Links []string `json:"links"`
|
||||
|
||||
Names []db.Name `json:"names"`
|
||||
|
@ -30,7 +30,7 @@ func dbMemberToMember(u db.User, m db.Member, names []db.Name, pronouns []db.Pro
|
|||
ID: m.ID,
|
||||
Name: m.Name,
|
||||
Bio: m.Bio,
|
||||
AvatarURL: m.AvatarURL,
|
||||
AvatarURLs: m.AvatarURLs,
|
||||
Links: m.Links,
|
||||
|
||||
Names: names,
|
||||
|
|
|
@ -8,7 +8,6 @@ create table users (
|
|||
display_name text,
|
||||
bio text,
|
||||
|
||||
avatar_source text,
|
||||
avatar_urls text[],
|
||||
links text[],
|
||||
|
||||
|
@ -36,11 +35,11 @@ create table user_fields (
|
|||
id bigserial primary key,
|
||||
name text not null,
|
||||
|
||||
favourite text[] not null default array[]::text[],
|
||||
okay text[] not null default array[]::text[],
|
||||
jokingly text[] not null default array[]::text[],
|
||||
friends_only text[] not null default array[]::text[],
|
||||
avoid text[] not null default array[]::text[]
|
||||
favourite text[],
|
||||
okay text[],
|
||||
jokingly text[],
|
||||
friends_only text[],
|
||||
avoid text[]
|
||||
);
|
||||
|
||||
create table members (
|
||||
|
@ -49,7 +48,7 @@ create table members (
|
|||
name text not null,
|
||||
bio text,
|
||||
|
||||
avatar_url text,
|
||||
avatar_urls text[],
|
||||
links text[]
|
||||
);
|
||||
|
||||
|
@ -73,9 +72,9 @@ create table member_fields (
|
|||
id bigserial primary key,
|
||||
name text not null,
|
||||
|
||||
favourite text[] not null default array[]::text[],
|
||||
okay text[] not null default array[]::text[],
|
||||
jokingly text[] not null default array[]::text[],
|
||||
friends_only text[] not null default array[]::text[],
|
||||
avoid text[] not null default array[]::text[]
|
||||
favourite text[],
|
||||
okay text[],
|
||||
jokingly text[],
|
||||
friends_only text[],
|
||||
avoid text[]
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue