fix: address PR review thread issues
Agent-Logs-Url: https://github.com/devitq/movienight-backend/sessions/d4d6ebbb-2508-484e-accf-c891be54750f Co-authored-by: devitq <118541411+devitq@users.noreply.github.com>
This commit is contained in:
co-authored by
devitq
parent
1f22be3401
commit
50923e2e5a
@@ -33,21 +33,7 @@ class FilmLibraryService(
|
||||
ListFilmLibraryEntriesUseCase {
|
||||
override fun create(command: CreateFilmLibraryCommand): FilmLibrary {
|
||||
findByUserId(command.userId)?.let { return it }
|
||||
|
||||
val libraryId = idGenerator.generateId()
|
||||
val saved =
|
||||
filmLibraryRepository.save(
|
||||
FilmLibrary(
|
||||
id = libraryId,
|
||||
userId = command.userId,
|
||||
filmId = libraryId,
|
||||
comment = command.name,
|
||||
isViewed = false,
|
||||
watchedAt = null,
|
||||
),
|
||||
)
|
||||
businessMetricsService.recordLibraryEvent()
|
||||
return saved
|
||||
throw EntityNotFoundException(entity = "Film library", id = command.userId.toString())
|
||||
}
|
||||
|
||||
override fun addFilm(command: AddFilmToLibraryCommand): FilmLibrary {
|
||||
|
||||
Reference in New Issue
Block a user