mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36:26 -08:00
Update fileApiRoutes.ts
This commit is contained in:
parent
f4d7128e04
commit
6b6f05ea4c
|
@ -30,16 +30,17 @@ fileApiRoutes.get("/list", (req,res) => {
|
|||
|
||||
let acc = Accounts.getFromToken(req.cookies.auth)
|
||||
|
||||
if (!acc) return
|
||||
if (!acc) return
|
||||
let accId = acc.id
|
||||
|
||||
res.send(acc.files.map((e) => {
|
||||
let fp = files.getFilePointer(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