diff --git a/apps/admin/data/fitai.db b/apps/admin/data/fitai.db index eda26cc..5a8d133 100644 Binary files a/apps/admin/data/fitai.db and b/apps/admin/data/fitai.db differ diff --git a/apps/admin/src/app/api/users/route.ts b/apps/admin/src/app/api/users/route.ts index 74b59c9..2ee9ecd 100644 --- a/apps/admin/src/app/api/users/route.ts +++ b/apps/admin/src/app/api/users/route.ts @@ -47,10 +47,10 @@ export async function GET(request: NextRequest) { "sample:", users && users[0] ? { - id: users[0].id, - role: users[0].role, - gymId: (users as any)[0].gymId, - } + id: users[0].id, + role: users[0].role, + gymId: (users as any)[0].gymId, + } : null, ); @@ -122,10 +122,10 @@ export async function GET(request: NextRequest) { "sample:", usersWithClients && usersWithClients[0] ? { - id: usersWithClients[0].id, - role: usersWithClients[0].role, - gymId: (usersWithClients as any)[0].gymId, - } + id: usersWithClients[0].id, + role: usersWithClients[0].role, + gymId: (usersWithClients as any)[0].gymId, + } : null, ); return NextResponse.json({ users: usersWithClients }); @@ -412,8 +412,8 @@ export async function PUT(request: NextRequest) { role: role ?? existingUser.role, phone: phone !== undefined ? phone : existingUser.phone, gymId: - updatedRow?.gym_id !== undefined - ? updatedRow.gym_id + updatedRow && (updatedRow as any).gym_id !== undefined + ? (updatedRow as any).gym_id : gymId !== undefined ? gymId : existingUser.gymId, diff --git a/apps/mobile/src/config/api.ts b/apps/mobile/src/config/api.ts index c8474d1..5f26573 100644 --- a/apps/mobile/src/config/api.ts +++ b/apps/mobile/src/config/api.ts @@ -1,5 +1,5 @@ export const API_BASE_URL = __DEV__ - ? "https://1e98d7618300.ngrok-free.app" + ? "https://fd87cefe27ae.ngrok-free.app" : "https://your-production-url.com"; export const API_ENDPOINTS = {