File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
back/src/domains/user/controller Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,25 @@ export class UserController {
7979 return { message : '관리자 회원가입이 성공적으로 완료되었습니다.' } ;
8080 }
8181
82+ @ApiOperation ( { summary : '게스트 모드' , description : '게스트 모드 요청을 받아 게스트 계정을 생성해준다.' } )
83+ @ApiOkResponse ( {
84+ description : '게스트 모드 성공' ,
85+ example : {
86+ id : 10 ,
87+ loginId : 'guest-a204cf2e-4243-4998-bb6a-4649b040f86f' ,
88+ userStatus : 'LOGIN' ,
89+ targetEvent : null ,
90+ } ,
91+ } )
92+ @ApiInternalServerErrorResponse ( { description : '게스트를 생성하는데 실패하였습니다.' } )
93+ @Get ( '/guest' )
94+ async useGuestMode ( @Res ( { passthrough : true } ) res : Response ) {
95+ const { sessionId, userInfo } = await this . userService . makeGuestUser ( ) ;
96+ res . cookie ( 'SID' , sessionId , { httpOnly : true } ) ;
97+
98+ return userInfo ;
99+ }
100+
82101 @ApiOperation ( { summary : '로그인' , description : 'id, password를 받아 로그인 요청을 처리한다.' } )
83102 @ApiBody ( {
84103 type : UserLoginDto ,
You can’t perform that action at this time.
0 commit comments