Skip to content

Commit

Permalink
adjust GET providers to accept query-param instead of body for personId
Browse files Browse the repository at this point in the history
  • Loading branch information
DPDS93CT committed Oct 16, 2023
1 parent 3eb7c84 commit 2b210b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/modules/rolle/api/provider.controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Body, Controller, Get } from '@nestjs/common';
import { Controller, Get, Query } from "@nestjs/common";

Check warning on line 1 in src/modules/rolle/api/provider.controller.ts

View workflow job for this annotation

GitHub Actions / nest_lint / Nest Lint

Replace `"@nestjs/common"` with `'@nestjs/common'`
import { RolleService } from '../domain/rolle.service.js';
import { ApiTags } from '@nestjs/swagger';
import { ServiceProviderDo } from '../domain/service-provider.do.js';
Expand All @@ -10,9 +10,7 @@ export class ProviderController {
public constructor(private readonly rolleService: RolleService) {}

@Get()
public async getServiceProvidersByPersonId(
@Body() params: ServiceProviderByPersonIdBodyParams,
): Promise<ServiceProviderDo<true>[]> {
public async getServiceProvidersByPersonId(@Query() params: ServiceProviderByPersonIdBodyParams): Promise<ServiceProviderDo<true>[]> {

Check warning on line 13 in src/modules/rolle/api/provider.controller.ts

View workflow job for this annotation

GitHub Actions / nest_lint / Nest Lint

Replace `@Query()·params:·ServiceProviderByPersonIdBodyParams` with `⏎········@query()·params:·ServiceProviderByPersonIdBodyParams,⏎····`
return this.rolleService.getAvailableServiceProviders(params.personId);
}
}
6 changes: 0 additions & 6 deletions src/modules/rolle/api/rolle.controller.ts

This file was deleted.

0 comments on commit 2b210b5

Please sign in to comment.