Fixed pagination not updating with async requests.

This commit is contained in:
2024-03-19 01:40:56 +01:00
parent 0bd4990b37
commit ab13ace280
6 changed files with 60 additions and 49 deletions

View File

@@ -498,7 +498,7 @@ async function queryManticoreSql(filters, options, _reqUser) {
?.data.map((row) => ({ key: row.channel_id || row['scenes.channel_id'], doc_count: row['count(*)'] }))
|| [];
const total = results.at(-1).data.find((entry) => entry.Variable_name === 'total_found').Value;
const total = Number(results.at(-1).data.find((entry) => entry.Variable_name === 'total_found').Value);
return {
scenes: results[0].data,