mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
25 lines
737 B
TypeScript
25 lines
737 B
TypeScript
import * as express from 'express';
|
|
import { buildUsersRoute, checkPermissionToUsersEndpoint } from './v2/users';
|
|
import { HomeDBManager } from 'app/gen-server/lib/homedb/HomeDBManager';
|
|
import SCIMMY from "scimmy";
|
|
import SCIMMYRouters from "scimmy-routers";
|
|
|
|
type SCIMMYResource = typeof SCIMMY.Types.Resource;
|
|
|
|
const buildScimRouter = (dbManager: HomeDBManager) => {
|
|
const v2 = express.Router();
|
|
v2.use('/Users', checkPermissionToUsersEndpoint, buildUsersRoute(dbManager));
|
|
|
|
SCIMMY.Resources.User.ingress(handler)
|
|
SCIMMY.Resources.declare(SCIMMY.Resources.User)
|
|
.ingress((resource: SCIMMYResource, data) => {
|
|
|
|
|
|
});
|
|
const scim = express.Router();
|
|
scim.use('/v2', v2);
|
|
return scim;
|
|
};
|
|
|
|
export { buildScimRouter };
|