Skip to content

Commit

Permalink
fix: organisations.service.spec
Browse files Browse the repository at this point in the history
  • Loading branch information
dainty92 committed Mar 3, 2025
1 parent 0d72bfc commit 1294c11
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/modules/organisations/organisations.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,9 @@ export class OrganisationsService {
if (!org) {
throw new NotFoundException(`Organisation with id: ${id} not found`);
}
org.isDeleted = true;
await this.organisationRepository.save(org);
await this.organisationRepository.update(id, { isDeleted: true }); // ✅ Use update

return { message: 'Organisation deleted successfully' }; // ✅ Match the test expectation
return { message: 'Organisation deleted successfully' };
} catch (error) {
if (error instanceof NotFoundException || error instanceof BadRequestException) {
throw error;
Expand Down

0 comments on commit 1294c11

Please sign in to comment.