-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ac3252
commit 5d4b0b1
Showing
7 changed files
with
60 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default eventHandler(async (event) => { | ||
// TODO: handle authorization | ||
const { pathname } = await getValidatedRouterParams(event, z.object({ | ||
pathname: z.string().min(1) | ||
}).parse) | ||
|
||
await useBlob().delete(pathname) | ||
|
||
return setResponseStatus(event, 204) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default eventHandler(async (event) => { | ||
// TODO: handle authorization | ||
const { pathname } = await getValidatedRouterParams(event, z.object({ | ||
pathname: z.string().min(1) | ||
}).parse) | ||
|
||
return useBlob().serve(event, pathname) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default eventHandler(async (event) => { | ||
// TODO: handle authorization | ||
|
||
const { pathname } = await getValidatedRouterParams(event, z.object({ | ||
pathname: z.string().min(1) | ||
}).parse) | ||
|
||
const blob = useBlob().head(pathname) | ||
|
||
setHeader(event, 'x-blob', JSON.stringify(blob)) | ||
|
||
return setResponseStatus(event, 204) | ||
}) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { z } from 'zod' |