chore: remove clerk, vercel, netlify, mongodb residues
This commit is contained in:
@@ -21,7 +21,7 @@ interface AuthRequest extends Request {
|
||||
export const syncUser = async (req: Request, res: Response) => {
|
||||
console.log('--- syncUser called ---', req.body);
|
||||
try {
|
||||
const { externalId, email, name, organizationId, clerkRole } = req.body;
|
||||
const { externalId, email, name, organizationId, incomingRole } = req.body;
|
||||
|
||||
if (!externalId || !email || !name) {
|
||||
return res.status(400).json({ error: 'externalId, email e name são obrigatórios.' });
|
||||
@@ -48,9 +48,9 @@ export const syncUser = async (req: Request, res: Response) => {
|
||||
|
||||
// Map Auth role to our app role
|
||||
let appRole: OrgRole = 'guest';
|
||||
if (clerkRole === 'org:admin') {
|
||||
if (incomingRole === 'org:admin') {
|
||||
appRole = 'admin';
|
||||
} else if (clerkRole === 'org:member') {
|
||||
} else if (incomingRole === 'org:member') {
|
||||
appRole = 'user';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user