Merge branch 'develop' of github.com:Frappet/hrms-api-org into develop

This commit is contained in:
kittapath 2025-03-17 15:48:53 +07:00
commit 9b4db9a66f

View file

@ -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.');
}
}