diff --git a/api/app.pl b/api/app.pl index b392d45..79b8878 100644 --- a/api/app.pl +++ b/api/app.pl @@ -98,7 +98,10 @@ get '/api/v1/tasks' => sub { "SELECT id, video_id, task_type AS type, status FROM tasks WHERE status=? AND task_type=? ORDER BY id LIMIT ? OFFSET ?" ); $sth->execute($status, $type, $per_page, $offset); - my $ref = $sth->fetchall_hashref('id'); + my $ref = []; + while(my $row = $sth->fetchrow_hashref()) { + push @$ref, $row; + } $sth->finish(); # Total count for pagination metadata diff --git a/docker-compose.yml b/docker-compose.yml index ab7e677..77325bd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,7 +36,7 @@ services: - API_BASE=http://10.0.1.34:3000/api/v1 volumes: - ./ui:/app - - nas_input:/data/input:ro + - nas_input:/data:ro networks: - videodetect-network depends_on: