Add getUserProfile and database.IsBanned

This commit is contained in:
Marco Realacci 2022-11-21 19:44:50 +01:00
parent 44eb1e1fa6
commit 53a764e8bb
13 changed files with 328 additions and 163 deletions

View file

@ -20,3 +20,26 @@ type Comment struct {
Comment string `json:"comment"`
Date string `json:"date"`
}
type Photo struct { //todo: move to structures
UID string `json:"user_id"`
ID int64 `json:"photo_id"`
Likes int64 `json:"likes"`
Comments int64 `json:"comments"`
Date string `json:"date"`
}
type UserPhoto struct {
ID int64 `json:"photo_id"`
Likes int64 `json:"likes"`
Comments int64 `json:"comments"`
Date string `json:"date"`
}
type UserProfile struct {
UID string `json:"user_id"`
Name string `json:"name"`
Following int64 `json:"following"`
Followers int64 `json:"followers"`
Photos *[]UserPhoto `json:"photos"` //todo: check json names
}