middleware
This commit is contained in:
1 parent
3bffe61b42
commit
816a1607a1
6 files changed
+10
-8
No files matched your search
@@ -122,6 +122,10 @@ export const addUserContext = async (
|
||||
const orgId = req.user.orgId;
|
||||
const currentTeamId = req.headers["x-team-id"] as string;
|
||||
|
||||
if (!currentTeamId || String(currentTeamId).trim().length === 0) {
|
||||
throw new ApiError("X-Team-Id header required", 400);
|
||||
}
|
||||
|
||||
// Get user team IDs
|
||||
const teamIds = await getTeamIds(sub);
|
||||
|
||||
|
||||
Reference in new issue
Block a user