Skip to content

Commit

Permalink
feat: 리뷰 반영
Browse files Browse the repository at this point in the history
api 분리와 api 경로를 통일성있게 변경
  • Loading branch information
Fixtar committed Nov 5, 2024
1 parent fe868e9 commit 77160c7
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 14 deletions.
3 changes: 2 additions & 1 deletion apps/api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import { AppService } from './app.service';
import { AuthModule } from './auth/auth.module';
import { StreamModule } from './stream/stream.module';
import { TicleModule } from './ticle/ticle.module';
import { UserModule } from './user/user.module';

@Module({
imports: [AuthModule, TicleModule, StreamModule],
imports: [AuthModule, TicleModule, StreamModule, UserModule],
controllers: [AppController],
providers: [AppService],
})
Expand Down
10 changes: 1 addition & 9 deletions apps/api/src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Controller, Get, Patch, Post } from '@nestjs/common';
import { Controller, Get, Post } from '@nestjs/common';

@Controller('auth')
export class AuthController {
Expand All @@ -10,14 +10,6 @@ export class AuthController {
@Post('login')
localLogin() {}

@Get('profile')
profile() {
return 'profile';
}

@Patch('/profile')
patchProfile() {}

@Get('google/login')
googleAuth() {}

Expand Down
8 changes: 4 additions & 4 deletions apps/api/src/ticle/ticle.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Controller, Get, Param, Post, Query } from '@nestjs/common';

@Controller('ticle')
export class TicleController {
@Post('')
@Post()
createTicle() {}

@Get(':ticleId')
Expand All @@ -12,8 +12,8 @@ export class TicleController {
getTicleList(@Query('filter') filter?: string, @Query('sort') sort?: string) {}

@Get('search')
getSearchList() {}
getTicleSearchList() {}

@Get(':ticleId/apply')
applyTicle(@Param('ticleId') params: any) {}
@Post(':ticleId/apply')
applyToTicle(@Param('ticleId') params: any) {}
}
14 changes: 14 additions & 0 deletions apps/api/src/user/user.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Controller, Get, Patch } from '@nestjs/common';

@Controller('user')
export class UserController {
constructor() {}

@Get('profile')
profile() {
return 'profile';
}

@Patch('profile')
patchProfile() {}
}
8 changes: 8 additions & 0 deletions apps/api/src/user/user.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Module } from '@nestjs/common';

import { UserController } from './user.controller';

@Module({
controllers: [UserController],
})
export class UserModule {}

0 comments on commit 77160c7

Please sign in to comment.