1
0
mirror of https://github.com/uetchy/namae.git synced 2025-08-20 09:58:13 +09:00

fix: reconstruct api

This commit is contained in:
2019-08-06 01:17:45 +09:00
parent 65453f95f7
commit a38cab3002
16 changed files with 87 additions and 80 deletions

View File

@@ -4,9 +4,9 @@ exports.fetch = (url, method = 'HEAD') => {
return fetch(url, { method })
}
exports.send = (res, availability) => {
exports.send = (res, obj) => {
res.setHeader('Cache-Control', 'maxage=0, s-maxage=3600')
res.json({ availability })
res.json(obj)
}
exports.sendError = (res, error) => {