feat: add user_setting model (#145)

* feat: add `user_setting` model

* chore: add global store

* chore: update settings in web

* chore: update `i18n` example
This commit is contained in:
boojack
2022-08-13 14:35:33 +08:00
committed by GitHub
parent dfac877957
commit 90b881502d
25 changed files with 449 additions and 63 deletions

View File

@ -46,6 +46,10 @@ export function getUserById(id: number) {
return axios.get<ResponseObject<User>>(`/api/user/${id}`);
}
export function upsertUserSetting(upsert: UserSettingUpsert) {
return axios.post<ResponseObject<UserSetting>>(`/api/user/setting`, upsert);
}
export function patchUser(userPatch: UserPatch) {
return axios.patch<ResponseObject<User>>(`/api/user/${userPatch.id}`, userPatch);
}