mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-09 07:29:07 +00:00
FIX: fix catalog route to use openSearch
This commit is contained in:
@@ -13,6 +13,7 @@ import { AuthenticateCondition } from '../../authentication/authentication.decor
|
||||
import { PERMISSIONS_GROUPS } from '../../authentication/permissions.enum';
|
||||
import { CatalogService } from './catalog.service';
|
||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||
import { PackTheMetadata } from 'src/utils/ PackTheMetadata';
|
||||
|
||||
@ApiTags('Catalog')
|
||||
@Controller('catalog')
|
||||
@@ -48,14 +49,24 @@ export class CatalogController {
|
||||
|
||||
@Get('all')
|
||||
async catalogAll(@Body() body) {
|
||||
const { user_id, customer, customer_id } = body.info;
|
||||
this.logger.info(`/catalog - ON CATALOG ALL ROUTE`, {
|
||||
user: body.info.user_id,
|
||||
customer: body.info.customer,
|
||||
});
|
||||
|
||||
const res = await this.catalogService.catalogAll(body);
|
||||
const metadata = PackTheMetadata({
|
||||
user_id,
|
||||
customer_id,
|
||||
customer_name: customer,
|
||||
});
|
||||
|
||||
return res;
|
||||
const res = await this.catalogService.getAllOpenSearchDataAssets(
|
||||
body,
|
||||
metadata,
|
||||
);
|
||||
|
||||
return { tables: res.data_assets };
|
||||
}
|
||||
|
||||
@Get('data_apps')
|
||||
|
||||
Reference in New Issue
Block a user