Indicate if stats are incomplete
This commit is contained in:
parent
c1791f8520
commit
f149156def
2 changed files with 27 additions and 18 deletions
|
@ -58,7 +58,9 @@ pugSync.beforeInclude("includes/collection-stats.pug", async (from, event, {acco
|
|||
|
||||
router.get("/:account/collection-stats", defineEventHandler(async event => {
|
||||
const {account} = await getValidatedRouterParams(event, schema.schema.account.parse)
|
||||
return pugSync.render(event, "collection-stats.pug", {account, isStatsPage: true})
|
||||
// if there are any untagged items then we don't have full track data
|
||||
const hasFullTrackData = !db.prepare("SELECT * FROM item LEFT JOIN item_tag USING (account, item_id) WHERE account = ? AND tag IS NULL").get(account)
|
||||
return pugSync.render(event, "collection-stats.pug", {account, hasFullTrackData, isStatsPage: true})
|
||||
}))
|
||||
|
||||
router.post("/api/settings/currency", defineEventHandler(async event => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue