generated from nhcarrigan/template
feat: add profile editing (bio, display name, stat visibility)
This commit is contained in:
@@ -8,6 +8,8 @@ import type {
|
||||
PublicProfileResponse,
|
||||
SaveRequest,
|
||||
SaveResponse,
|
||||
UpdateProfileRequest,
|
||||
UpdateProfileResponse,
|
||||
} from "@elysium/types";
|
||||
|
||||
const BASE_URL = "/api";
|
||||
@@ -79,3 +81,11 @@ export const getPublicProfile = async (
|
||||
discordId: string,
|
||||
): Promise<PublicProfileResponse> =>
|
||||
request<PublicProfileResponse>(`/profile/${discordId}`);
|
||||
|
||||
export const updateProfile = async (
|
||||
body: UpdateProfileRequest,
|
||||
): Promise<UpdateProfileResponse> =>
|
||||
request<UpdateProfileResponse>("/profile", {
|
||||
method: "PUT",
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user