mirror of
https://github.com/skidoodle/albert.lol.git
synced 2025-02-15 06:09:15 +01:00
s3 refactoring, cache-control
This commit is contained in:
parent
7108943dc2
commit
7f3e74abd4
3 changed files with 84 additions and 96 deletions
|
@ -20,9 +20,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
return acc + curr.Size! / 1024 / 1024 / 1024
|
||||
}, 0)
|
||||
|
||||
res.statusCode = 200
|
||||
res.setHeader('Content-Type', 'application/json')
|
||||
res.end(JSON.stringify({
|
||||
res.setHeader('Cache-Control', 's-maxage=86400');
|
||||
res.status(200).json (JSON.stringify({
|
||||
'objectCount': data.KeyCount,
|
||||
'totalSize': (Math.round(totalsize * 100) / 100)
|
||||
}, null, 2))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue