diff --git a/README.md b/README.md index 4d34facd9..eddb87c3e 100644 --- a/README.md +++ b/README.md @@ -13,67 +13,4 @@
A progressive Node.js framework for building efficient and scalable server-side applications.
- - -## Description - -[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. - -## Installation - -```bash -$ npm install -``` - -## Running the app - -```bash -# development -$ npm run start - -# watch mode -$ npm run start:dev - -# production mode -$ npm run start:prod -``` - -## Test - -```bash -# unit tests -$ npm run test - -# e2e tests -$ npm run test:e2e - -# test coverage -$ npm run test:cov -``` - -## Support - -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). - -## Stay in touch - -- Author - [Kamil MyĆliwiec](https://kamilmysliwiec.com) -- Website - [https://nestjs.com](https://nestjs.com/) -- Twitter - [@nestframework](https://twitter.com/nestframework) - -## License -Nest is [MIT licensed](LICENSE). diff --git a/src/features/family/family.controller.ts b/src/features/family/family.controller.ts index 96b05f6a4..d82a48941 100644 --- a/src/features/family/family.controller.ts +++ b/src/features/family/family.controller.ts @@ -198,7 +198,11 @@ export class FamilyController { }); // confirm duration - const confirmDuration = daysDifference(need.created, need.confirmDate); + let confirmDuration = daysDifference(need.created, need.confirmDate); + if (confirmDuration < 0) { + // some data from 2019 have wrong confirm dates, such as need 35 + confirmDuration = 0; + } const confirmsInRange = await this.needService.getConfirmsInRange( need.confirmDate, need.category, diff --git a/src/features/midjourney/midjourney.controller.ts b/src/features/midjourney/midjourney.controller.ts index 0f4bab0c4..afb631e59 100644 --- a/src/features/midjourney/midjourney.controller.ts +++ b/src/features/midjourney/midjourney.controller.ts @@ -115,11 +115,12 @@ export class MidjourneyController { const limit = X_LIMIT > 100 ? 100 : X_LIMIT; const page = X_TAKE + 1; const needsWithSignatures = - await this.midjourneyService.getReadyToSignNeeds({ + await this.midjourneyService.getOnlyReadyToMidjourney({ page: page, limit: limit, path: '', }); + const count = await this.midjourneyService.countAllNeedJourney(); const list = []; @@ -135,7 +136,11 @@ export class MidjourneyController { }); } }); - return { total: needsWithSignatures.meta.totalItems, list }; + return { + totalReady: needsWithSignatures.meta.totalItems, + total: count, + list, + }; } @ApiFileResponse('image/png') diff --git a/src/features/midjourney/midjourney.service.ts b/src/features/midjourney/midjourney.service.ts index 0c6b3de43..6f3ff026f 100644 --- a/src/features/midjourney/midjourney.service.ts +++ b/src/features/midjourney/midjourney.service.ts @@ -100,7 +100,7 @@ export class MidjourneyService { return await this.needService.getNeedByFlaskId(flaskNeedId); } - async getReadyToSignNeeds( + async getOnlyReadyToMidjourney( options: PaginateQuery, ): Promise