protect routes and import function
This commit is contained in:
1 parent
e600f293b0
commit
f476a57748
12 files changed
+112
-28
No files matched your search
@@ -11,7 +11,7 @@ type NumberKeys<T> = {
|
||||
}[keyof T];
|
||||
|
||||
const getEntitlements = (req: Request): Entitlements | undefined => {
|
||||
return (req as any).entitlements as Entitlements | undefined;
|
||||
return req.entitlements;
|
||||
};
|
||||
|
||||
export const requireFeature = (flag: BooleanKeys<Entitlements>) => {
|
||||
|
||||
Reference in new issue
Block a user