1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-01-24 05:17:16 +02:00
pigallery2/backend/routes/AdminRouter.ts

29 lines
662 B
TypeScript
Raw Normal View History

2016-05-25 20:17:42 +02:00
import {AuthenticationMWs} from "../middlewares/user/AuthenticationMWs";
2016-12-27 16:09:47 +01:00
import {UserRoles} from "../../common/entities/UserDTO";
2016-05-09 17:04:56 +02:00
export class AdminRouter {
public static route(app: any) {
this.addResetDB(app);
this.addIndexGallery(app);
}
private static addResetDB(app) {
app.post("/api/admin/db/reset",
AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.Admin)
//TODO: implement
);
};
private static addIndexGallery(app) {
app.post("/api/admin/gallery/index",
AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.Admin)
//TODO: implement
);
};
}