catch up
This commit is contained in:
parent
1a2bd83e8d
commit
36315ea5cf
Binary file not shown.
@ -47,10 +47,10 @@ export async function GET(request: NextRequest) {
|
|||||||
"sample:",
|
"sample:",
|
||||||
users && users[0]
|
users && users[0]
|
||||||
? {
|
? {
|
||||||
id: users[0].id,
|
id: users[0].id,
|
||||||
role: users[0].role,
|
role: users[0].role,
|
||||||
gymId: (users as any)[0].gymId,
|
gymId: (users as any)[0].gymId,
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -122,10 +122,10 @@ export async function GET(request: NextRequest) {
|
|||||||
"sample:",
|
"sample:",
|
||||||
usersWithClients && usersWithClients[0]
|
usersWithClients && usersWithClients[0]
|
||||||
? {
|
? {
|
||||||
id: usersWithClients[0].id,
|
id: usersWithClients[0].id,
|
||||||
role: usersWithClients[0].role,
|
role: usersWithClients[0].role,
|
||||||
gymId: (usersWithClients as any)[0].gymId,
|
gymId: (usersWithClients as any)[0].gymId,
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
);
|
);
|
||||||
return NextResponse.json({ users: usersWithClients });
|
return NextResponse.json({ users: usersWithClients });
|
||||||
@ -412,8 +412,8 @@ export async function PUT(request: NextRequest) {
|
|||||||
role: role ?? existingUser.role,
|
role: role ?? existingUser.role,
|
||||||
phone: phone !== undefined ? phone : existingUser.phone,
|
phone: phone !== undefined ? phone : existingUser.phone,
|
||||||
gymId:
|
gymId:
|
||||||
updatedRow?.gym_id !== undefined
|
updatedRow && (updatedRow as any).gym_id !== undefined
|
||||||
? updatedRow.gym_id
|
? (updatedRow as any).gym_id
|
||||||
: gymId !== undefined
|
: gymId !== undefined
|
||||||
? gymId
|
? gymId
|
||||||
: existingUser.gymId,
|
: existingUser.gymId,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
export const API_BASE_URL = __DEV__
|
export const API_BASE_URL = __DEV__
|
||||||
? "https://1e98d7618300.ngrok-free.app"
|
? "https://fd87cefe27ae.ngrok-free.app"
|
||||||
: "https://your-production-url.com";
|
: "https://your-production-url.com";
|
||||||
|
|
||||||
export const API_ENDPOINTS = {
|
export const API_ENDPOINTS = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user