refactor: integrate Better-Auth for authentication and remove Supabase dependencies
This commit is contained in:
@@ -5,10 +5,10 @@ type ComplexIdParams = { complexId: string };
|
||||
|
||||
export async function listCourtsByComplexHandler(c: AppContext) {
|
||||
const { complexId } = c.req.valid('param' as never) as ComplexIdParams;
|
||||
const appUserId = c.get('appUserId');
|
||||
const user = c.get('user');
|
||||
|
||||
try {
|
||||
const courts = await listCourtsByComplex(complexId, appUserId);
|
||||
const courts = await listCourtsByComplex(complexId, user.id);
|
||||
return c.json(courts);
|
||||
} catch (error) {
|
||||
if (error instanceof CourtServiceError) {
|
||||
|
||||
Reference in New Issue
Block a user