mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-03 17:44:44 +02:00
add shad
This commit is contained in:
parent
86e66f4236
commit
282203d9f2
20 changed files with 697 additions and 15634 deletions
|
@ -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,
|
||||
|
|
|
@ -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'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue