Skip to content

Commit bda5304

Browse files
committed
fix: add auth guard on attend meetup + translate error message
1 parent 85d4bad commit bda5304

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "course-vue-backend",
3-
"version": "1.3.8",
3+
"version": "1.3.9",
44
"description": "API backend for learn.javascript.ru VueJS Course",
55
"author": "Grigorii K. Shartsev <[email protected]>",
66
"private": true,

src/auth/dto/register-user.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export class RegisterUserDto {
44
@IsNotEmpty({ message: 'Имя не может быть пустым' })
55
readonly fullname!: string;
66

7-
@IsEmail()
7+
@IsEmail({}, { message: 'Email адрес должен быть валидным' })
88
readonly email!: string;
99

1010
@MinLength(6, { message: 'Пароль должен состоять как минимум из 6 символов' })

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function bootstrap() {
3535

3636
const options = new DocumentBuilder()
3737
.setTitle('Meetups API')
38-
.setVersion('1.3.8')
38+
.setVersion('1.3.9')
3939
.addSecurity('cookie-session', {
4040
type: 'apiKey',
4141
in: 'cookie',

src/meetups/meetups.controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export class MeetupsController {
9494
}
9595

9696
@Put(':meetupId/participation')
97+
@UseGuards(AuthenticatedGuard)
9798
@ApiOperation({
9899
summary: 'Добавление текущего пользователя в список участников митапа',
99100
})

0 commit comments

Comments
 (0)