From 75c6eac63b99a01c1cb72cc99716b40085a5d797 Mon Sep 17 00:00:00 2001 From: Dennis Chen Date: Wed, 12 Jun 2024 10:27:06 -0700 Subject: [PATCH] display owner username instead of email in listings --- frontend/src/hooks/api.tsx | 2 +- frontend/src/pages/Login.tsx | 2 ++ frontend/src/pages/Register.tsx | 3 +++ store/app/routers/users.py | 5 +++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/hooks/api.tsx b/frontend/src/hooks/api.tsx index f22e145a..1a07ad1f 100644 --- a/frontend/src/hooks/api.tsx +++ b/frontend/src/hooks/api.tsx @@ -76,7 +76,7 @@ export class api { } public async getUserById(userId: string | undefined): Promise { const response = await this.api.get(`/users/${userId}`); - return response.data.email; + return response.data.username; } public async getRobots(): Promise { try { diff --git a/frontend/src/pages/Login.tsx b/frontend/src/pages/Login.tsx index 0f386848..63d33de6 100644 --- a/frontend/src/pages/Login.tsx +++ b/frontend/src/pages/Login.tsx @@ -31,6 +31,7 @@ const Login = () => { { Description: { { { Description: