feat: page duplicate + code styling fixes

This commit is contained in:
NGPixel
2024-12-22 21:26:55 -05:00
parent 1a6b5851b3
commit 7425a74b6a
8 changed files with 1000 additions and 640 deletions
+3 -3
View File
@@ -106,9 +106,9 @@ export default {
throw new Error('ERR_FORBIDDEN')
}
const results = args.states?.length > 0 ?
await WIKI.db.knex('jobHistory').whereIn('state', args.states.map(s => s.toLowerCase())).orderBy('startedAt', 'desc') :
await WIKI.db.knex('jobHistory').orderBy('startedAt', 'desc')
const results = args.states?.length > 0
? await WIKI.db.knex('jobHistory').whereIn('state', args.states.map(s => s.toLowerCase())).orderBy('startedAt', 'desc')
: await WIKI.db.knex('jobHistory').orderBy('startedAt', 'desc')
return results.map(r => ({
...r,
state: r.state.toUpperCase()