chore: remove clerk, vercel, netlify, mongodb residues
This commit is contained in:
@@ -40,7 +40,7 @@ export const setApiOrgId = (orgId: string | null) => {
|
||||
// Alias for consistency
|
||||
export const setApiOrganizationId = setApiOrgId;
|
||||
|
||||
// Request interceptor to add clerk user ID and Org ID headers
|
||||
// Request interceptor to add user ID and Org ID headers
|
||||
api.interceptors.request.use(
|
||||
(config) => {
|
||||
console.log(`[API Request] ${config.method?.toUpperCase()} ${config.url}`, {
|
||||
|
||||
@@ -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