Skip to content

Commit

Permalink
Merge pull request #27 from bcgov/feat/sr-get-record-and-validate
Browse files Browse the repository at this point in the history
Service request Auth Guard
  • Loading branch information
hannah-macdonald1 authored Nov 13, 2024
2 parents 3720ea5 + 5a91203 commit 9051617
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/configuration/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export default () => ({
},
sr: {
endpoint: process.env.SR_ENDPOINT.trim().replace(/\s/g, '%20'),
workspace: 'dev_sadmin_4426_2',
workspace: 'int_lab',
idirField: 'Owner',
},
memo: {
endpoint: process.env.MEMO_ENDPOINT.trim().replace(/\s/g, '%20'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { TokenRefresherService } from '../../external-api/token-refresher/token-
import { UtilitiesService } from '../../helpers/utilities/utilities.service';
import { RequestPreparerService } from '../../external-api/request-preparer/request-preparer.service';
import { idName } from '../../common/constants/parameter-constants';
import { AuthService } from '../../common/guards/auth/auth.service';

describe('ServiceRequestsController', () => {
let controller: ServiceRequestsController;
Expand All @@ -25,6 +26,7 @@ describe('ServiceRequestsController', () => {
imports: [ConfigModule.forRoot()],
providers: [
ServiceRequestsService,
AuthService,
SupportNetworkService,
TokenRefresherService,
RequestPreparerService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Get,
Param,
Query,
UseGuards,
UseInterceptors,
ValidationPipe,
} from '@nestjs/common';
Expand Down Expand Up @@ -31,8 +32,10 @@ import {
idName,
} from '../../common/constants/parameter-constants';
import { ApiInternalServerErrorEntity } from '../../entities/api-internal-server-error.entity';
import { AuthGuard } from '../../common/guards/auth/auth.guard';

@Controller('sr')
@UseGuards(AuthGuard)
@ApiNotFoundResponse({ type: ApiNotFoundEntity })
@ApiInternalServerErrorResponse({ type: ApiInternalServerErrorEntity })
export class ServiceRequestsController {
Expand Down

0 comments on commit 9051617

Please sign in to comment.