Compare commits

..
Author SHA1 Message Date
Marcos Rodrigues 24fce721e3 FIX: api key catalog roles 2025-12-01 09:32:26 -03:00
2 changed files with 4 additions and 3 deletions
-1
View File
@@ -26,7 +26,6 @@ async function bootstrap() {
corsOrigins.push(
'https://app.stg.dadosfera.ai',
'https://app.dadosfera.ai',
'https://private-frontend.stg.dadosfera.ai',
'https://unimed.dadosfera.ai',
'https://boston-scientific.dadosfera.ai',
'https://plataforma.dadosfera.ai'
+4 -2
View File
@@ -197,9 +197,11 @@ class CatalogService implements OnModuleInit {
async getUserRolesIds(userId: string) {
const result = await this.userService.findOneById(userId).catch(() => null);
const roles_ids = result.user.roles.map((role) => role.id);
if (result) {
return result.user.roles.map((role) => role.id);
}
return roles_ids;
return [];
}
async searchDataAssets(