Skip to content

Commit

Permalink
fix: fix sync
Browse files Browse the repository at this point in the history
  • Loading branch information
MatanYadaev committed Nov 12, 2024
1 parent 0ec7e26 commit a621cc5
Showing 1 changed file with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,23 @@ export class BusinessReportControllerExternal {
});
}

@common.Get('/sync')
@UseGuards(AdminAuthGuard)
@swagger.ApiOkResponse({ type: [String] })
@swagger.ApiForbiddenResponse({ type: errors.ForbiddenException })
@swagger.ApiExcludeEndpoint()
async list() {
return await this.prisma.businessReport.findMany({
include: {
project: {
include: {
customer: true,
},
},
},
});
}

@common.Get(':id')
@swagger.ApiOkResponse({ type: BusinessReportDto })
@swagger.ApiForbiddenResponse({ type: errors.ForbiddenException })
Expand Down Expand Up @@ -203,21 +220,4 @@ export class BusinessReportControllerExternal {
res.setHeader('content-type', 'application/json');
res.send(result);
}

@common.Get('/sync')
@UseGuards(AdminAuthGuard)
@swagger.ApiOkResponse({ type: [String] })
@swagger.ApiForbiddenResponse({ type: errors.ForbiddenException })
@swagger.ApiExcludeEndpoint()
async list() {
return await this.prisma.businessReport.findMany({
include: {
project: {
include: {
customer: true,
},
},
},
});
}
}

0 comments on commit a621cc5

Please sign in to comment.