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 8b5246e commit 0ec7e26
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
6 changes: 0 additions & 6 deletions apps/backoffice-v2/src/domains/workflows/fetchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ export const BaseWorkflowByIdSchema = z.object({
vendor: z.string().optional(),
}).optional(),
documents: z.array(z.any()).default([]),
metadata: z
.object({
collectionFlowUrl: z.string().url().optional(),
token: z.string().optional(),
})
.optional(),
entity: z.record(z.any(), z.any()),
parentMachine: ObjectWithIdSchema.extend({
status: z.union([z.literal('active'), z.literal('failed'), z.literal('completed')]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Query,
Res,
UploadedFile,
UseGuards,
UseInterceptors,
} from '@nestjs/common';
import * as swagger from '@nestjs/swagger';
Expand Down Expand Up @@ -34,6 +35,7 @@ import { RemoveTempFileInterceptor } from '@/common/interceptors/remove-temp-fil
import { CreateBusinessReportBatchBodyDto } from '@/business-report/dto/create-business-report-batch-body.dto';
import type { Response } from 'express';
import { PrismaService } from '@/prisma/prisma.service';
import { AdminAuthGuard } from '@/common/guards/admin-auth.guard';

@ApiBearerAuth()
@swagger.ApiTags('Business Reports')
Expand Down Expand Up @@ -202,20 +204,20 @@ export class BusinessReportControllerExternal {
res.send(result);
}

// @common.Get()
// @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('/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 0ec7e26

Please sign in to comment.