Feat: update user profile (#491)
* add update profile api * may update email * may update username
This commit is contained in:
@@ -82,6 +82,17 @@ export class Client {
|
||||
return this.api.get("/api/me");
|
||||
}
|
||||
|
||||
updateProfile(
|
||||
id: string,
|
||||
params: {
|
||||
name?: string;
|
||||
email?: string;
|
||||
code?: string;
|
||||
}
|
||||
): Promise<UserType> {
|
||||
return this.api.put(`/api/users/${id}`, decamelizeKeys(params));
|
||||
}
|
||||
|
||||
loginCode(params: { phoneNumber?: string; email?: string }): Promise<void> {
|
||||
return this.api.post("/api/sessions/login_code", decamelizeKeys(params));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user