From 77160c70a59de736b10272ac5f42f01566810194 Mon Sep 17 00:00:00 2001 From: seongha <11pi885@gmail.com> Date: Tue, 5 Nov 2024 15:12:57 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=A6=AC=EB=B7=B0=20=EB=B0=98=EC=98=81?= =?UTF-8?q?=20api=20=EB=B6=84=EB=A6=AC=EC=99=80=20api=20=EA=B2=BD=EB=A1=9C?= =?UTF-8?q?=EB=A5=BC=20=ED=86=B5=EC=9D=BC=EC=84=B1=EC=9E=88=EA=B2=8C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/src/app.module.ts | 3 ++- apps/api/src/auth/auth.controller.ts | 10 +--------- apps/api/src/ticle/ticle.controller.ts | 8 ++++---- apps/api/src/user/user.controller.ts | 14 ++++++++++++++ apps/api/src/user/user.module.ts | 8 ++++++++ 5 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 apps/api/src/user/user.controller.ts create mode 100644 apps/api/src/user/user.module.ts diff --git a/apps/api/src/app.module.ts b/apps/api/src/app.module.ts index 45991098..1afe06db 100644 --- a/apps/api/src/app.module.ts +++ b/apps/api/src/app.module.ts @@ -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], }) diff --git a/apps/api/src/auth/auth.controller.ts b/apps/api/src/auth/auth.controller.ts index 5ff7c3ae..e430cf5b 100644 --- a/apps/api/src/auth/auth.controller.ts +++ b/apps/api/src/auth/auth.controller.ts @@ -1,4 +1,4 @@ -import { Controller, Get, Patch, Post } from '@nestjs/common'; +import { Controller, Get, Post } from '@nestjs/common'; @Controller('auth') export class AuthController { @@ -10,14 +10,6 @@ export class AuthController { @Post('login') localLogin() {} - @Get('profile') - profile() { - return 'profile'; - } - - @Patch('/profile') - patchProfile() {} - @Get('google/login') googleAuth() {} diff --git a/apps/api/src/ticle/ticle.controller.ts b/apps/api/src/ticle/ticle.controller.ts index c3b6484f..c9bc05d9 100644 --- a/apps/api/src/ticle/ticle.controller.ts +++ b/apps/api/src/ticle/ticle.controller.ts @@ -2,7 +2,7 @@ import { Controller, Get, Param, Post, Query } from '@nestjs/common'; @Controller('ticle') export class TicleController { - @Post('') + @Post() createTicle() {} @Get(':ticleId') @@ -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) {} } diff --git a/apps/api/src/user/user.controller.ts b/apps/api/src/user/user.controller.ts new file mode 100644 index 00000000..7b59fc64 --- /dev/null +++ b/apps/api/src/user/user.controller.ts @@ -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() {} +} diff --git a/apps/api/src/user/user.module.ts b/apps/api/src/user/user.module.ts new file mode 100644 index 00000000..d81488f4 --- /dev/null +++ b/apps/api/src/user/user.module.ts @@ -0,0 +1,8 @@ +import { Module } from '@nestjs/common'; + +import { UserController } from './user.controller'; + +@Module({ + controllers: [UserController], +}) +export class UserModule {}