style(format): run ktlint format

This commit is contained in:
ITQ
2026-05-03 21:08:43 +03:00
parent 9c7a562323
commit d9f45a9e4c
6 changed files with 49 additions and 48 deletions
@@ -56,10 +56,11 @@ class FilmController(
FilmResponse.fromDomain(
editFilmUseCase.edit(
id = id,
command = EditFilmCommand(
title = request.title,
description = request.description,
),
command =
EditFilmCommand(
title = request.title,
description = request.description,
),
),
)
@@ -72,16 +73,13 @@ class FilmController(
@GetMapping("/{id}")
fun getById(
@PathVariable id: UUID,
): FilmResponse =
FilmResponse.fromDomain(getFilmByIdUseCase.getById(id))
): FilmResponse = FilmResponse.fromDomain(getFilmByIdUseCase.getById(id))
@GetMapping("/search")
fun searchByTitle(
@RequestParam title: String,
): FilmResponse? =
searchFilmByTitleUseCase.searchByTitle(title)?.let { FilmResponse.fromDomain(it) }
): FilmResponse? = searchFilmByTitleUseCase.searchByTitle(title)?.let { FilmResponse.fromDomain(it) }
@GetMapping
fun getAll(): List<FilmResponse> =
getAllFilmsUseCase.getAll().map { FilmResponse.fromDomain(it) }
fun getAll(): List<FilmResponse> = getAllFilmsUseCase.getAll().map { FilmResponse.fromDomain(it) }
}
@@ -63,9 +63,10 @@ class FilmLibraryController(
fun getAllFilmsInLibrary(
@PathVariable userId: UUID,
): List<FilmResponse> {
val library = getFilmLibraryUseCase.getLibrary(
GetFilmLibraryQuery(userId = userId)
)
val library =
getFilmLibraryUseCase.getLibrary(
GetFilmLibraryQuery(userId = userId),
)
val film = getFilmByIdUseCase.getById(library.filmId)
@@ -105,9 +106,10 @@ class FilmLibraryController(
fun getAvailableFilms(
@PathVariable userId: UUID,
): List<FilmResponse> {
val userLibrary = getFilmLibraryUseCase.getLibrary(
GetFilmLibraryQuery(userId = userId)
)
val userLibrary =
getFilmLibraryUseCase.getLibrary(
GetFilmLibraryQuery(userId = userId),
)
val allFilms = getAllFilmsUseCase.getAll()
@@ -46,14 +46,12 @@ class UserController(
)
@GetMapping
fun getAll(): List<UserResponse> =
getAllUsersUseCase.getAll().map { UserResponse.fromDomain(it) }
fun getAll(): List<UserResponse> = getAllUsersUseCase.getAll().map { UserResponse.fromDomain(it) }
@GetMapping("/{id}")
fun getById(
@PathVariable id: UUID,
): UserResponse =
UserResponse.fromDomain(getUserByIdUseCase.getById(id))
): UserResponse = UserResponse.fromDomain(getUserByIdUseCase.getById(id))
@PatchMapping("/{id}")
fun edit(
@@ -63,9 +61,10 @@ class UserController(
UserResponse.fromDomain(
editUserUseCase.edit(
id = id,
command = EditUserCommand(
name = request.name,
),
command =
EditUserCommand(
name = request.name,
),
),
)