Features/public biography endpoint (#316)

This commit is contained in:
Aaron Po
2026-09-26 19:51:10 -04:00
committed by GitHub
parent e1b6cba1d4
commit c5972b9f04
20 changed files with 158 additions and 104 deletions

View File

@@ -162,11 +162,12 @@ export const refreshTokens = async (refreshToken: string) => {
return data.payload;
};
export const getUserAccount = async (
accessToken: string,
userAccountId: string,
): Promise<UserAccountDetails> => {
const res = await fetch(`${API_BASE_URL}/api/user/${userAccountId}`, {
/**
* Fetches the signed-in caller's own account. The backend derives the account from the access
* token, so the caller passes no ID.
*/
export const getUserAccount = async (accessToken: string): Promise<UserAccountDetails> => {
const res = await fetch(`${API_BASE_URL}/api/user/authenticated`, {
headers: { Authorization: `Bearer ${accessToken}` },
});