mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-02-20 20:29:04 +00:00
query amount of temporary uploads for statistics
This commit is contained in:
parent
c6e83653db
commit
771a3f65d2
@ -736,6 +736,7 @@ self.stats = async (req, res, next) => {
|
||||
Images: 0,
|
||||
Videos: 0,
|
||||
Others: 0,
|
||||
Temporary: 0,
|
||||
'Size in DB': {
|
||||
value: 0,
|
||||
type: 'byte'
|
||||
@ -768,6 +769,12 @@ self.stats = async (req, res, next) => {
|
||||
})
|
||||
.count('id as count')
|
||||
.then(rows => rows[0].count)
|
||||
})(),
|
||||
(async () => {
|
||||
stats[data.title].Temporary = await db.table('files')
|
||||
.whereNotNull('expirydate')
|
||||
.count('id as count')
|
||||
.then(rows => rows[0].count)
|
||||
})()
|
||||
])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user