Skip to content

Add common films endpoint - #5

Merged
ksupyl merged 1 commit into
developfrom
add-common-films
Oct 8, 2026
Merged

ksupyl merged 1 commit into
developfrom
add-common-films

Conversation

@ksupyl

@ksupyl ksupyl commented Oct 7, 2026

Copy link
Copy Markdown
Owner

GET /films/common?userId={userId}&friendId={friendId} — фильмы, которые лайкнули оба пользователя, по убыванию популярности. Если кого-то из пользователей нет — 404.

Заодно вынесла LIMIT из хвоста запроса популярных: buildPopularQuery теперь собирает чтение + условия + сортировку по лайкам без лимита, его можно переиспользовать в поиске и фильмах режиссёра.
В findPopular лимит добавляется отдельно, поведение не изменилось.

@ksupyl ksupyl changed the title feat: add common films endpoint Add common films endpoint Oct 7, 2026

@Kirill-Kazantcev Kirill-Kazantcev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Регрессии нет, тесты зелёные.
LIMIT в отдельную константу т.к не используется findCommon - ОК

@ksupyl
ksupyl merged commit b7cadec into develop Oct 8, 2026
2 checks passed
@ksupyl ksupyl linked an issue Oct 8, 2026 that may be closed by this pull request
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.

Функциональность «Общие фильмы». 1 SP

3 participants