mirror of
https://github.com/dadosfera/maestro.git
synced 2026-12-02 17:00:05 +00:00
Compare commits
2
Commits
v1.4.3-alpha.3
...
v1.4.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
849b979e63 | ||
|
|
28580782b1 |
@@ -173,6 +173,17 @@ export class CatalogController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Post('data-rating')
|
||||||
|
async createDataRating(@Body() body) {
|
||||||
|
console.log(`/catalog`, 'ON GET DATA RATING ROUTE');
|
||||||
|
|
||||||
|
const catalogService = new CatalogService();
|
||||||
|
|
||||||
|
const res = await catalogService.createDataRating(body);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
@Get('summary-rating/:id')
|
@Get('summary-rating/:id')
|
||||||
async getSummaryRating(@Param() params, @Body() body) {
|
async getSummaryRating(@Param() params, @Body() body) {
|
||||||
console.log(`/catalog`, 'ON GET SUMMARY RATING ROUTE');
|
console.log(`/catalog`, 'ON GET SUMMARY RATING ROUTE');
|
||||||
@@ -196,6 +207,17 @@ export class CatalogController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Post('data-comment')
|
||||||
|
async createDataComment(@Body() body) {
|
||||||
|
console.log(`/catalog`, 'ON GET DATA COMMENT ROUTE');
|
||||||
|
|
||||||
|
const catalogService = new CatalogService();
|
||||||
|
|
||||||
|
const res = await catalogService.createDataComment(body);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
@Get('data-review')
|
@Get('data-review')
|
||||||
async getDataReview(@Body() body) {
|
async getDataReview(@Body() body) {
|
||||||
console.log(`/catalog`, 'ON GET DATA REVIEW ROUTE');
|
console.log(`/catalog`, 'ON GET DATA REVIEW ROUTE');
|
||||||
|
|||||||
@@ -184,6 +184,19 @@ class CatalogService {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async createDataRating(body) {
|
||||||
|
const customer =
|
||||||
|
body.info.customer.toLowerCase() === 'dadosfera'
|
||||||
|
? ``
|
||||||
|
: `-${body.info.customer.toLowerCase()}`;
|
||||||
|
|
||||||
|
const { data } = await axios.post(
|
||||||
|
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data-rating/`,
|
||||||
|
body,
|
||||||
|
);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
async getSummaryRating(id, body) {
|
async getSummaryRating(id, body) {
|
||||||
const customer =
|
const customer =
|
||||||
body.info.customer.toLowerCase() === 'dadosfera'
|
body.info.customer.toLowerCase() === 'dadosfera'
|
||||||
@@ -207,6 +220,19 @@ class CatalogService {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async createDataComment(body) {
|
||||||
|
const customer =
|
||||||
|
body.info.customer.toLowerCase() === 'dadosfera'
|
||||||
|
? ``
|
||||||
|
: `-${body.info.customer.toLowerCase()}`;
|
||||||
|
|
||||||
|
const { data } = await axios.post(
|
||||||
|
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/data-comment/`,
|
||||||
|
body,
|
||||||
|
);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
async getDataReview(body) {
|
async getDataReview(body) {
|
||||||
const customer =
|
const customer =
|
||||||
body.info.customer.toLowerCase() === 'dadosfera'
|
body.info.customer.toLowerCase() === 'dadosfera'
|
||||||
|
|||||||
Reference in New Issue
Block a user