mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user