docs: complete swagger annotations for auth, home, blogs and wiki endpoints
This commit is contained in:
1 parent
e09adc03c3
commit
24137beb32
4 files changed
+39
-3
No files matched your search
@@ -97,6 +97,8 @@ export class AuthController {
|
||||
@Post('register')
|
||||
@HttpCode(HttpStatus.CREATED)
|
||||
@ApiOperation({ summary: 'ثبتنام با ایمیل/موبایل و رمز عبور' })
|
||||
@ApiOkResponse({ description: 'کاربر با موفقیت ثبتنام شد' })
|
||||
@ApiBadRequestResponse({ description: 'اطلاعات ثبتنام نامعتبر است یا کاربر از قبل وجود دارد' })
|
||||
register(@Body() registerDto: RegisterDto) {
|
||||
return this.authService.register(registerDto);
|
||||
}
|
||||
@@ -104,6 +106,8 @@ export class AuthController {
|
||||
@Post('login')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@ApiOperation({ summary: 'ورود با موبایل و رمز عبور' })
|
||||
@ApiOkResponse({ description: 'ورود موفق به همراه توکن دسترسی' })
|
||||
@ApiBadRequestResponse({ description: 'نام کاربری یا رمز عبور اشتباه است' })
|
||||
login(@Body() loginDto: LoginDto) {
|
||||
return this.authService.login(loginDto);
|
||||
}
|
||||
@@ -111,6 +115,8 @@ export class AuthController {
|
||||
@Post('admin-login')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@ApiOperation({ summary: 'ورود ادمین به پنل مدیریت' })
|
||||
@ApiOkResponse({ description: 'ورود موفق ادمین به همراه توکن' })
|
||||
@ApiBadRequestResponse({ description: 'اطلاعات ورود ادمین اشتباه است' })
|
||||
adminLogin(@Body() body: any) {
|
||||
return this.authService.adminLogin(body);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user