chore: finish profile
This commit is contained in:
+10
-2
@@ -107,6 +107,11 @@ export interface UpdateUsername {
|
||||
export interface UpdatePassword {
|
||||
password: string
|
||||
}
|
||||
|
||||
export interface TelegramInfo {
|
||||
telegram: string
|
||||
}
|
||||
|
||||
// --- Endpoints ---
|
||||
|
||||
export const api = {
|
||||
@@ -157,6 +162,9 @@ export const api = {
|
||||
request<DemoDetails>('POST', '/demos/details', { username }),
|
||||
updateUsername: (username: string) =>
|
||||
request<UpdateUsername>('POST', '/profile/username', { username }),
|
||||
updatePassword: (password: string) =>
|
||||
request<UpdatePassword>('POST', '/profile/password', { password })
|
||||
updatePassword: (password: string) =>
|
||||
request<UpdatePassword>('POST', '/profile/password', { password }),
|
||||
getTelegram: () => request<TelegramInfo>('GET', '/profile/telegram'),
|
||||
setTelegram: (telegram: string) =>
|
||||
request<TelegramInfo>('POST', '/profile/telegram', { telegram }),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user