Skip to content

Add database - #2

Closed
Darya346 wants to merge 21 commits into
mainfrom
add-database
Closed

Darya346 wants to merge 21 commits into
mainfrom
add-database

Conversation

@Darya346

Copy link
Copy Markdown
Owner

No description provided.

userService.addFriend(id, friendId);
}

@DeleteMapping("/{id}/friends/{friendId}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Одинаковые пути лучше вынести в переменные для избежания дубляжей

}
if (film.getMpa() != null) {
mpaStorage.getById(film.getMpa().getId())
.orElseThrow(() -> new NotFoundException("Рейтинг MPA с id=" + film.getMpa().getId() + " не найден."));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше использовать String.format

private Genre mapRowToGenre(ResultSet rs, int rowNum) throws SQLException {
return new Genre(
rs.getInt("id"),
rs.getString("name")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Непонятное название переменной

@Darya346 Darya346 closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants