diff --git a/src/controllers/OrganizationController.ts b/src/controllers/OrganizationController.ts index cf86d6e7..f77b48a0 100644 --- a/src/controllers/OrganizationController.ts +++ b/src/controllers/OrganizationController.ts @@ -146,6 +146,7 @@ export class OrganizationController extends Controller { revision.createdAt = new Date(); revision.lastUpdatedAt = new Date(); await this.orgRevisionRepository.save(revision, { data: request }); + setLogDataDiff(request, { before, after: revision }); const msg = { data: { @@ -156,9 +157,9 @@ export class OrganizationController extends Controller { } try { await sendToQueueOrgDraft(msg); - return { message: 'Draft is being created... Processing in the background.' }; + return new HttpSuccess ('Draft is being created... Processing in the background.'); } catch (error:any) { - return { message: 'Failed to process the draft. Please try again later.', error: error.message }; + return new HttpError (HttpStatusCode.NOT_FOUND,'Failed to process the draft. Please try again later.'); } }