This commit is contained in:
Milo Schwartz 2024-10-06 09:55:45 -04:00
parent 86e66f4236
commit 282203d9f2
No known key found for this signature in database
20 changed files with 697 additions and 15634 deletions

View file

@ -36,6 +36,7 @@ export async function logout(
status: HttpCode.OK,
});
} catch (error) {
logger.error("Failed to log out", error);
return next(
createHttpError(
HttpCode.INTERNAL_SERVER_ERROR,

View file

@ -7,7 +7,7 @@ import HttpCode from '@server/types/HttpCode';
import { AuthenticatedRequest } from '@server/types/Auth';
export function verifyOrgAccess(req: Request, res: Response, next: NextFunction) {
const userId = req.user.id; // Assuming you have user information in the request
const userId = req.user!.id; // Assuming you have user information in the request
const orgId = parseInt(req.params.orgId);
if (!userId) {
@ -33,4 +33,4 @@ export function verifyOrgAccess(req: Request, res: Response, next: NextFunction)
.catch((error) => {
next(createHttpError(HttpCode.INTERNAL_SERVER_ERROR, 'Error verifying organization access'));
});
}
}