Skip to content

Commit

Permalink
chore(storage): add production hub api routes
Browse files Browse the repository at this point in the history
  • Loading branch information
smarroufin committed Jan 30, 2024
1 parent c97f5a9 commit 3974989
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _nuxthub/server/api/_hub/bucket/[key].delete.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default eventHandler(async (event) => {
// TODO
return {}
})
4 changes: 4 additions & 0 deletions _nuxthub/server/api/_hub/bucket/[key].get.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default eventHandler(async (event) => {
// TODO
return {}
})
11 changes: 11 additions & 0 deletions _nuxthub/server/api/_hub/bucket/index.get.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { useValidatedQuery, z } from 'h3-zod'

export default eventHandler(async (event) => {
// TODO: handle authorization

const { name } = await useValidatedQuery(event, {
name: z.ostring()
})

return useBlob(name).list()
})
4 changes: 4 additions & 0 deletions _nuxthub/server/api/_hub/bucket/index.put.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default eventHandler(async (event) => {
// TODO
return {}
})

0 comments on commit 3974989

Please sign in to comment.