Skip to content

Commit

Permalink
Removing res property from globals
Browse files Browse the repository at this point in the history
  • Loading branch information
pushyamig committed Mar 22, 2024
1 parent 5ac2862 commit 90afaff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions ccm_web/server/src/api/api.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ import {
Post,
Put,
Query,
Req,
Session,
UseGuards,
UseInterceptors
} from '@nestjs/common'
import { Request } from 'express'
import { ApiQuery, ApiSecurity } from '@nestjs/swagger'

import { Globals, isAPIErrorData, ExternalUserData } from './api.interfaces'
Expand Down Expand Up @@ -52,8 +50,8 @@ export class APIController {
constructor (private readonly apiService: APIService) { }

@Get('globals')
getGlobals (@Session() session: SessionData, @UserDec() user: User, @Req() req: Request): Globals {
return this.apiService.getGlobals(user, session, req)
getGlobals (@Session() session: SessionData, @UserDec() user: User): Globals {
return this.apiService.getGlobals(user, session)
}

@UseInterceptors(InvalidTokenInterceptor)
Expand Down
2 changes: 1 addition & 1 deletion ccm_web/server/src/api/api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class APIService {
private readonly invitationService: CirrusInvitationService
) {}

getGlobals (user: User, sessionData: SessionData, req: Request): Globals {
getGlobals (user: User, sessionData: SessionData): Globals {
return {
environment: this.configService.get('server.isDev', { infer: true }) ? 'development' : 'production',
canvasURL: this.configService.get('canvas.instanceURL', { infer: true }),
Expand Down

0 comments on commit 90afaff

Please sign in to comment.