feat: update user profile (#280)

This commit is contained in:
Khanh Ngo 2022-12-21 21:52:00 +01:00 committed by GitHub
parent 24a0a9f5ee
commit 86e8ad41cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 192 additions and 7 deletions

View file

@ -127,6 +127,11 @@ func (o *JsonDB) GetUser() (model.User, error) {
return user, o.conn.Read("server", "users", &user)
}
// SaveUser func to user info to the database
func (o *JsonDB) SaveUser(user model.User) error {
return o.conn.Write("server", "users", user)
}
// GetGlobalSettings func to query global settings from the database
func (o *JsonDB) GetGlobalSettings() (model.GlobalSetting, error) {
settings := model.GlobalSetting{}