mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 13:45:24 +02:00
Mark oriol.rodrigo@craze-group.com as validated in status checks and admin list
This commit is contained in:
@@ -148,6 +148,10 @@ export default async function handler(req, res) {
|
||||
return res.json({ validated: true });
|
||||
}
|
||||
|
||||
if (callerEmail.toLowerCase() === 'oriol.rodrigo@craze-group.com') {
|
||||
return res.json({ validated: true });
|
||||
}
|
||||
|
||||
const approvalsRes = await fetch(`${SUPABASE_URL}/rest/v1/user_approvals?id=eq.${callerId}&select=validated`, {
|
||||
headers: {
|
||||
'apikey': SUPABASE_SERVICE_KEY,
|
||||
@@ -210,6 +214,17 @@ export default async function handler(req, res) {
|
||||
return { id, email, created_at: createdAt, status };
|
||||
});
|
||||
|
||||
// Inject mock user oriol.rodrigo@craze-group.com so they display as validated in admin UI
|
||||
const hasOriol = mergedUsers.some(u => u.email?.toLowerCase() === 'oriol.rodrigo@craze-group.com');
|
||||
if (!hasOriol) {
|
||||
mergedUsers.push({
|
||||
id: 'mock-id-oriol',
|
||||
email: 'oriol.rodrigo@craze-group.com',
|
||||
created_at: new Date(2026, 0, 1).toISOString(),
|
||||
status: 'Validated'
|
||||
});
|
||||
}
|
||||
|
||||
return res.json({ users: mergedUsers, warning });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user