mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 08:14:06 +00:00
25 lines
655 B
TypeScript
25 lines
655 B
TypeScript
import express from 'express';
|
|
const router = express.Router();
|
|
import { body } from 'express-validator';
|
|
import { requireAuth, validateRequest } from '../middleware';
|
|
import { membershipOrgController } from '../controllers';
|
|
|
|
router.post(
|
|
'/signup',
|
|
requireAuth,
|
|
body('inviteeEmail').exists().trim().notEmpty().isEmail(),
|
|
body('organizationId').exists().trim().notEmpty(),
|
|
validateRequest,
|
|
membershipOrgController.inviteUserToOrganization
|
|
);
|
|
|
|
router.post(
|
|
'/verify',
|
|
body('email').exists().trim().notEmpty(),
|
|
body('code').exists().trim().notEmpty(),
|
|
validateRequest,
|
|
membershipOrgController.verifyUserToOrganization
|
|
);
|
|
|
|
export default router;
|