mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-22 05:46:26 -08:00
Update fileApiRoutes.ts
This commit is contained in:
parent
f4d7128e04
commit
6b6f05ea4c
|
@ -31,15 +31,16 @@ fileApiRoutes.get("/list", (req,res) => {
|
|||
let acc = Accounts.getFromToken(req.cookies.auth)
|
||||
|
||||
if (!acc) return
|
||||
let accId = acc.id
|
||||
|
||||
res.send(acc.files.map((e) => {
|
||||
let fp = files.getFilePointer(e)
|
||||
if (!fp) { Accounts.files.deindex(accId, e); return null }
|
||||
return {
|
||||
...fp,
|
||||
messageids: null,
|
||||
owner: null,
|
||||
id:e,
|
||||
sizeDisplay: fp.sizeInBytes ? bytes(fp.sizeInBytes) : "[File size unknown]"
|
||||
id:e
|
||||
}
|
||||
}))
|
||||
|
||||
|
|
Loading…
Reference in a new issue