fix some endpoints
This commit is contained in:
parent
7aee99ac42
commit
6f1b94c040
10 changed files with 47 additions and 41 deletions
|
@ -12,13 +12,7 @@ type Blog struct {
|
|||
Domain *string `json:"domain"`
|
||||
Bio string `json:"bio"`
|
||||
|
||||
Account blogPartialAccount `json:"account"`
|
||||
}
|
||||
|
||||
type blogPartialAccount struct {
|
||||
ID ulid.ULID `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Domain *string `json:"domain"`
|
||||
Account Account `json:"account"`
|
||||
}
|
||||
|
||||
func DBBlogToBlog(b database.Blog, a database.Account) Blog {
|
||||
|
@ -27,10 +21,6 @@ func DBBlogToBlog(b database.Blog, a database.Account) Blog {
|
|||
Name: b.Name,
|
||||
Domain: b.Domain,
|
||||
Bio: b.Bio,
|
||||
Account: blogPartialAccount{
|
||||
ID: a.ID,
|
||||
Username: a.Username,
|
||||
Domain: a.Domain,
|
||||
},
|
||||
Account: DBAccountToAccount(a),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue