mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
18 lines
409 B
TypeScript
18 lines
409 B
TypeScript
const adminUser = (): { hook: (app: any) => void } => {
|
|
return {
|
|
hook(app) {
|
|
app.use((req, res, next) => {
|
|
req.user = {
|
|
isAPI: true,
|
|
id: 1,
|
|
email: 'unknown',
|
|
permissions: ['ADMIN'],
|
|
};
|
|
next();
|
|
});
|
|
},
|
|
};
|
|
};
|
|
|
|
export default adminUser;
|