Upgrade workers-types, make post url a string

This commit is contained in:
Erisa A 2023-03-04 19:48:17 +00:00
parent f1e0aabca9
commit b7e8a4246b
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View file

@ -14,7 +14,7 @@
"hono": "^3.0.2"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20221111.1",
"@cloudflare/workers-types": "^4.20230228.0",
"prettier": "^2.8.4",
"wrangler": "^2.12.0"
}

View file

@ -116,7 +116,7 @@ app.post('/', async (c) => {
if (!body) {
c.set('key', '/' + Math.random().toString(36).slice(5))
c.set('shortUrl', new URL(c.get('key'), c.req.url))
c.set('shortUrl', new URL(c.get('key'), c.req.url).toString())
return await createLink(c)
} else {
// bulk upload from body

View file

@ -9,7 +9,7 @@
dependencies:
mime "^3.0.0"
"@cloudflare/workers-types@^4.20221111.1":
"@cloudflare/workers-types@^4.20230228.0":
version "4.20230228.0"
resolved "https://registry.yarnpkg.com/@cloudflare/workers-types/-/workers-types-4.20230228.0.tgz#f2311f4f8943f15d097426bcb9a0e7d3aa5b5c1d"
integrity sha512-tDaqH3DrKmDoe/YrCnzVSqjNH6GnUOOajv2Ztj2h7BPLFyYTb81iCkARgb+G4bpxhn7y4f1KxxDT2+Yp4rt7Hg==