feat(backend): remove avatar_source field, change avatar_urls on member
This commit is contained in:
parent
5679dbb657
commit
85a061ebc5
4 changed files with 32 additions and 34 deletions
|
@ -14,7 +14,7 @@ type Member struct {
|
||||||
UserID xid.ID
|
UserID xid.ID
|
||||||
Name string
|
Name string
|
||||||
Bio *string
|
Bio *string
|
||||||
AvatarURL *string
|
AvatarURLs []string `db:"avatar_urls"`
|
||||||
Links []string
|
Links []string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ type User struct {
|
||||||
DisplayName *string
|
DisplayName *string
|
||||||
Bio *string
|
Bio *string
|
||||||
|
|
||||||
AvatarSource *string
|
|
||||||
AvatarURLs []string `db:"avatar_urls"`
|
AvatarURLs []string `db:"avatar_urls"`
|
||||||
Links []string
|
Links []string
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ type GetMemberResponse struct {
|
||||||
ID xid.ID `json:"id"`
|
ID xid.ID `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Bio *string `json:"bio"`
|
Bio *string `json:"bio"`
|
||||||
AvatarURL *string `json:"avatar_url"`
|
AvatarURLs []string `json:"avatar_urls"`
|
||||||
Links []string `json:"links"`
|
Links []string `json:"links"`
|
||||||
|
|
||||||
Names []db.Name `json:"names"`
|
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,
|
ID: m.ID,
|
||||||
Name: m.Name,
|
Name: m.Name,
|
||||||
Bio: m.Bio,
|
Bio: m.Bio,
|
||||||
AvatarURL: m.AvatarURL,
|
AvatarURLs: m.AvatarURLs,
|
||||||
Links: m.Links,
|
Links: m.Links,
|
||||||
|
|
||||||
Names: names,
|
Names: names,
|
||||||
|
|
|
@ -8,7 +8,6 @@ create table users (
|
||||||
display_name text,
|
display_name text,
|
||||||
bio text,
|
bio text,
|
||||||
|
|
||||||
avatar_source text,
|
|
||||||
avatar_urls text[],
|
avatar_urls text[],
|
||||||
links text[],
|
links text[],
|
||||||
|
|
||||||
|
@ -36,11 +35,11 @@ create table user_fields (
|
||||||
id bigserial primary key,
|
id bigserial primary key,
|
||||||
name text not null,
|
name text not null,
|
||||||
|
|
||||||
favourite text[] not null default array[]::text[],
|
favourite text[],
|
||||||
okay text[] not null default array[]::text[],
|
okay text[],
|
||||||
jokingly text[] not null default array[]::text[],
|
jokingly text[],
|
||||||
friends_only text[] not null default array[]::text[],
|
friends_only text[],
|
||||||
avoid text[] not null default array[]::text[]
|
avoid text[]
|
||||||
);
|
);
|
||||||
|
|
||||||
create table members (
|
create table members (
|
||||||
|
@ -49,7 +48,7 @@ create table members (
|
||||||
name text not null,
|
name text not null,
|
||||||
bio text,
|
bio text,
|
||||||
|
|
||||||
avatar_url text,
|
avatar_urls text[],
|
||||||
links text[]
|
links text[]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -73,9 +72,9 @@ create table member_fields (
|
||||||
id bigserial primary key,
|
id bigserial primary key,
|
||||||
name text not null,
|
name text not null,
|
||||||
|
|
||||||
favourite text[] not null default array[]::text[],
|
favourite text[],
|
||||||
okay text[] not null default array[]::text[],
|
okay text[],
|
||||||
jokingly text[] not null default array[]::text[],
|
jokingly text[],
|
||||||
friends_only text[] not null default array[]::text[],
|
friends_only text[],
|
||||||
avoid text[] not null default array[]::text[]
|
avoid text[]
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue