mirror of
https://github.com/System-End/cdn.git
synced 2026-04-19 16:18:17 +00:00
Update newSingle.ts
This commit is contained in:
parent
35cdee72a1
commit
3103294d0e
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ export default async (req: ServerRequest) => {
|
|||
|
||||
const decoder = new TextDecoder()
|
||||
const buf = await Deno.readAll(req.body)
|
||||
const singleFileURL = JSON.parse(decoder.decode(buf))
|
||||
const singleFileURL = decoder.decode(buf)
|
||||
if (typeof singleFileURL != 'string') {
|
||||
return req.respond({ status: 422, body: JSON.stringify({ error: 'newSingle only accepts a single URL' }) })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue