Merge branch 'dev' into staging
This commit is contained in:
commit
446c0f58bd
@ -42,8 +42,8 @@ export default class DocumentsController extends ApiController {
|
||||
}
|
||||
const officeId: string = req.body.user.office_Id;
|
||||
const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId };
|
||||
if (!query.where) query.where = { document_type: { office: officeWhereInput } };
|
||||
query.where.document_type!.office = officeWhereInput;
|
||||
|
||||
query.where = { ...query.where, document_type: { office: officeWhereInput } };
|
||||
|
||||
//call service to get prisma entity
|
||||
const documentEntities = await this.documentsService.get(query);
|
||||
@ -186,11 +186,9 @@ export default class DocumentsController extends ApiController {
|
||||
//call service to get prisma entity
|
||||
const documentEntityUpdated: Documents = await this.documentsService.refuse(uid, documentEntity, req.body.refused_reason);
|
||||
|
||||
|
||||
//create email for asked document
|
||||
await this.emailBuilder.sendDocumentEmails(documentEntityUpdated);
|
||||
|
||||
|
||||
//Hydrate ressource with prisma entity
|
||||
const document = Document.hydrate<Document>(documentEntityUpdated, { strategy: "excludeAll" });
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user