build(deps): bump hono from 4.11.7 to 4.12.22
Fix TypeScript errors from stricter c.req.param() types (string | undefined).
This commit is contained in:
4 files changed
+10
-6
No files matched your search
@@ -9,6 +9,10 @@ export async function handle(c: Context<{ Bindings: Env }>): Promise<Response> {
|
||||
const attachmentId = c.req.param("attachmentId");
|
||||
const filename = c.req.param("filename");
|
||||
|
||||
if (!attachmentId || !filename) {
|
||||
return new Response("Not found", { status: 404 });
|
||||
}
|
||||
|
||||
const object = await c.env.ATTACHMENT_BUCKET.get(attachmentId);
|
||||
|
||||
if (!object) {
|
||||
|
||||
Reference in new issue
Block a user