Skip to content

Commit

Permalink
feat(api): set updateAt in organizationForAdminRepository.update
Browse files Browse the repository at this point in the history
  • Loading branch information
bpetetot authored Jun 14, 2024
1 parent 8aec2fb commit 054056c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ const update = async function (organization, domainTransaction = DomainTransacti
await _addTags(knexConn, organization.tagsToAdd);
await _removeTags(knexConn, organization.tagsToRemove);

await knexConn(ORGANIZATIONS_TABLE_NAME).update(organizationRawData).where({ id: organization.id });
await knexConn(ORGANIZATIONS_TABLE_NAME)
.update({ ...organizationRawData, updatedAt: new Date() })
.where({ id: organization.id });
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ describe('Integration | Organizational Entities | Infrastructure | Repository |
// then
const updatedOrganization = await knex('organizations').where({ id: childOrganization.id }).first();
expect(updatedOrganization.parentOrganizationId).to.equal(parentOrganizationId);
expect(updatedOrganization.updatedAt).to.deep.equal(new Date('2022-02-02'));
});

it('should enable feature', async function () {
Expand Down

0 comments on commit 054056c

Please sign in to comment.