diff --git a/.drone.yml b/.drone.yml index 2d5c9b2..4e7d618 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,24 +1,3 @@ ---- -kind: pipeline -name: tests:14.15.1-alpine3.12 -clone: - disable: true -steps: - - name: checkout pr - image: alpine/git - commands: - - git clone $DRONE_REMOTE_URL . - - git checkout $DRONE_SOURCE_BRANCH - - mv .env.ci .env - - name: run tests - image: node:14.15.1-alpine3.12 - commands: - - yarn - - yarn test:ci -trigger: - event: - - pull_request - --- kind: pipeline name: tests:node_latest diff --git a/src/controllers/DonorController.ts b/src/controllers/DonorController.ts index 4fdfb10..4b0d508 100644 --- a/src/controllers/DonorController.ts +++ b/src/controllers/DonorController.ts @@ -24,7 +24,7 @@ export class DonorController { @Get() @Authorized("DONOR:GET") @ResponseSchema(ResponseDonor, { isArray: true }) - @OpenAPI({ description: 'Lists all runners from all teams/orgs.
This includes the runner\'s group and distance ran.' }) + @OpenAPI({ description: 'Lists all donor.
This includes the donor\'s current donation amount.' }) async getAll() { let responseDonors: ResponseDonor[] = new Array(); const donors = await this.donorRepository.find({ relations: ['donations', 'donations.runner', 'donations.runner.scans', 'donations.runner.scans.track'] }); @@ -39,7 +39,7 @@ export class DonorController { @ResponseSchema(ResponseDonor) @ResponseSchema(DonorNotFoundError, { statusCode: 404 }) @OnUndefined(DonorNotFoundError) - @OpenAPI({ description: 'Lists all information about the runner whose id got provided.' }) + @OpenAPI({ description: 'Lists all information about the donor whose id got provided.
This includes the donor\'s current donation amount.' }) async getOne(@Param('id') id: number) { let donor = await this.donorRepository.findOne({ id: id }, { relations: ['donations', 'donations.runner', 'donations.runner.scans', 'donations.runner.scans.track'] }) if (!donor) { throw new DonorNotFoundError(); } @@ -49,7 +49,7 @@ export class DonorController { @Post() @Authorized("DONOR:CREATE") @ResponseSchema(ResponseDonor) - @OpenAPI({ description: 'Create a new runner.
Please remeber to provide the runner\'s group\'s id.' }) + @OpenAPI({ description: 'Create a new donor.' }) async post(@Body({ validate: true }) createRunner: CreateDonor) { let donor; try { @@ -67,7 +67,7 @@ export class DonorController { @ResponseSchema(ResponseDonor) @ResponseSchema(DonorNotFoundError, { statusCode: 404 }) @ResponseSchema(DonorIdsNotMatchingError, { statusCode: 406 }) - @OpenAPI({ description: "Update the runner whose id you provided.
Please remember that ids can't be changed." }) + @OpenAPI({ description: "Update the donor whose id you provided.
Please remember that ids can't be changed." }) async put(@Param('id') id: number, @Body({ validate: true }) donor: UpdateDonor) { let oldDonor = await this.donorRepository.findOne({ id: id }); @@ -88,7 +88,7 @@ export class DonorController { @ResponseSchema(ResponseDonor) @ResponseSchema(ResponseEmpty, { statusCode: 204 }) @OnUndefined(204) - @OpenAPI({ description: 'Delete the runner whose id you provided.
If no runner with this id exists it will just return 204(no content).' }) + @OpenAPI({ description: 'Delete the donor whose id you provided.
If no donor with this id exists it will just return 204(no content).
If the donor still has donations associated this will fail, please provide the query param ?force=true to delete the donor with all associated donations.' }) async remove(@Param("id") id: number, @QueryParam("force") force: boolean) { let donor = await this.donorRepository.findOne({ id: id }); if (!donor) { return null; }