Skip to content

Commit

Permalink
fix: fixed dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
esther-ajayib authored and dainty92 committed Mar 2, 2025
1 parent 64735f6 commit 009a3c2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
28 changes: 16 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,17 @@
"postinstall": "npm install --platform=linux --arch=x64 sharp"
},
"dependencies": {

"@google/generative-ai": "^0.22.0",
"@nestjs/axios": "^4.0.0",
"@nestjs/bull": "^11.0.2",
"@nestjs/config": "^4.0.0",
"@nestjs/core": "^11.0.10",
"@nestjs/jwt": "^11.0.0",
"@nestjs/passport": "^11.0.5",
"@nestjs/platform-express": "^11.0.10",
"@css-inline/css-inline": "^0.14.1",
"@css-inline/css-inline-linux-x64-gnu": "^0.14.1",
"@faker-js/faker": "^8.4.1",
"@google/generative-ai": "^0.17.0",
"@nestjs/axios": "^3.1.3",
"@nestjs/bull": "^10.2.0",
"@nestjs/config": "^3.2.3",
"@nestjs/core": "^10.4.15",
"@nestjs/jwt": "^10.2.0",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^11.0.11",
"@nestjs/schedule": "^5.0.1",
"@nestjs/serve-static": "^5.0.3",
"@nestjs/swagger": "^11.0.5",
Expand All @@ -51,18 +53,19 @@
"@types/speakeasy": "^2.0.10",
"@vitalets/google-translate-api": "^9.2.1",
"aws-sdk": "^2.1692.0",
"axios": "^1.8.1",
"bcrypt": "^5.1.1",
"bcryptjs": "^3.0.2",
"bull": "^4.16.5",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"csv-writer": "^1.6.0",
"date-fns": "^4.1.0",
"express": "^4.21.2",
"express": "^5.0.1",
"file-type-mime": "^0.4.6",
"google-auth-library": "^9.15.1",
"handlebars": "^4.7.8",
"html-validator": "^5.1.18",
"html-validator": "^6.0.1",
"ioredis": "^5.5.0",
"joi": "^17.13.3",
"module-alias": "^2.2.3",
Expand All @@ -74,6 +77,7 @@
"passport-google-oauth20": "^2.0.0",
"passport-jwt": "^4.0.1",
"pg": "^8.13.3",
"pino-http": "^10.4.0",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.2",
"sharp": "^0.33.5",
Expand All @@ -89,7 +93,7 @@
"@commitlint/config-conventional": "^19.7.1",
"@nestjs-modules/mailer": "^1.6.1",
"@nestjs/cli": "^11.0.5",
"@nestjs/common": "^11.0.11",
"@nestjs/common": "^10.4.15",
"@nestjs/schematics": "^11.0.1",
"@nestjs/testing": "^11.0.10",
"@types/bcrypt": "^5.0.2",
Expand Down
10 changes: 8 additions & 2 deletions src/modules/organisations/organisations.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,22 @@ export class OrganisationsService {
};
}

async getUserOrganisations(userId: string) {
async getUserOrganisations(userId: string, page: number = 1, page_size: number = 10) {
// const organisations = await this.getAllUserOrganisations(userId);
const organisations = await this.organisationRepository.find({
const [organisations, total_count] = await this.organisationRepository.findAndCount({
where: { isDeleted: false },
skip: (page - 1) * page_size,
take: page_size,
});

return {
status_code: HttpStatus.OK,
message: 'Organisations retrieved successfully',
data: {
organisations,
total_count,
current_page: page,
page_size,
},
};
}
Expand Down

0 comments on commit 009a3c2

Please sign in to comment.