Compare commits

...
2 Commits
Author SHA1 Message Date
rodrigo.zamboni 827c7b1bf1 FIX: Summary-rating returning default 0 values 2022-05-04 12:00:01 -03:00
rodrigo.zamboni 8d89b747b4 FIX: Fix delete routes method 2022-05-04 00:24:44 -03:00
2 changed files with 13 additions and 10 deletions
+8 -5
View File
@@ -218,15 +218,18 @@ export class CatalogController {
} }
@Get('summary-rating/:id') @Get('summary-rating/:id')
async getSummaryRating(@Param() params, @Body() body) { async getSummaryRating() {
console.log(`/catalog`, 'ON GET SUMMARY RATING ROUTE'); console.log(`/catalog`, 'ON GET SUMMARY RATING ROUTE');
const { id } = params; //const { id } = params;
const catalogService = new CatalogService(); //const catalogService = new CatalogService();
const res = await catalogService.getSummaryRating(id, body); //const res = await catalogService.getSummaryRating(id, body);
return res; return {
avg_rating: 0,
rating_count: 0,
};
} }
@Get('data-comment') @Get('data-comment')
+5 -5
View File
@@ -136,7 +136,7 @@ class CatalogService {
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai` ? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`; : `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
const { data } = await axios.get( const { data } = await axios.delete(
`${nimbusUrl}/api/catalog/table-metadata/${id}`, `${nimbusUrl}/api/catalog/table-metadata/${id}`,
); );
return data; return data;
@@ -171,7 +171,7 @@ class CatalogService {
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai` ? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`; : `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
const { data } = await axios.get( const { data } = await axios.delete(
`${nimbusUrl}/api/catalog/column-metadata/${id}/`, `${nimbusUrl}/api/catalog/column-metadata/${id}/`,
); );
return data; return data;
@@ -454,7 +454,7 @@ class CatalogService {
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai` ? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`; : `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
const { data } = await axios.get(`${nimbusUrl}/api/catalog/tags/${id}`); const { data } = await axios.delete(`${nimbusUrl}/api/catalog/tags/${id}`);
return data; return data;
} }
@@ -487,7 +487,7 @@ class CatalogService {
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai` ? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`; : `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
const { data } = await axios.get( const { data } = await axios.delete(
`${nimbusUrl}/api/catalog/table-tags/${id}`, `${nimbusUrl}/api/catalog/table-tags/${id}`,
); );
return data; return data;
@@ -522,7 +522,7 @@ class CatalogService {
? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai` ? `https://nimbus-${body.info.customer.toLowerCase()}.dadosfera.ai`
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`; : `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
const { data } = await axios.get( const { data } = await axios.delete(
`${nimbusUrl}/api/catalog/table-rules/${id}`, `${nimbusUrl}/api/catalog/table-rules/${id}`,
); );
return data; return data;