Fixed movie duration returned as string, therefore failing formatting.
This commit is contained in:
@@ -79,7 +79,7 @@ export async function fetchMoviesById(movieIds, reqUser) {
|
||||
stashes,
|
||||
} = await promiseProps({
|
||||
movies: knex('movies')
|
||||
.select('movies.*', knex.raw('sum(releases.duration) as duration'))
|
||||
.select('movies.*', knex.raw('cast(sum(releases.duration) as integer) as duration'))
|
||||
.leftJoin('movies_scenes', 'movies_scenes.movie_id', 'movies.id')
|
||||
.leftJoin('releases', 'releases.id', 'movies_scenes.scene_id')
|
||||
.whereIn('movies.id', movieIds)
|
||||
|
||||
Reference in New Issue
Block a user