Add authenticated user profile page with locked-down account endpoint (#315)

This commit is contained in:
Aaron Po
2026-09-23 00:58:54 -04:00
committed by GitHub
parent a6a9046457
commit 0ff42c3c70
45 changed files with 1418 additions and 80 deletions

View File

@@ -162,8 +162,13 @@ export const refreshTokens = async (refreshToken: string) => {
return data.payload;
};
export const getUserAccount = async (userAccountId: string): Promise<UserAccountDetails> => {
const res = await fetch(`${API_BASE_URL}/api/user/${userAccountId}`);
export const getUserAccount = async (
accessToken: string,
userAccountId: string,
): Promise<UserAccountDetails> => {
const res = await fetch(`${API_BASE_URL}/api/user/${userAccountId}`, {
headers: { Authorization: `Bearer ${accessToken}` },
});
if (!res.ok) {
const text = await res.text();