Changed types
This commit is contained in:
@@ -98,7 +98,8 @@ export default async function fileRoutes(server: FastifyInstance) {
|
||||
server.post("/files/download/:id?", async (req, reply) => {
|
||||
const { id } = req.params as { id?: string }
|
||||
|
||||
const ids = req.body?.ids || []
|
||||
const { ids } = req.body as { ids: string[] }
|
||||
|
||||
|
||||
try {
|
||||
if (id) {
|
||||
@@ -180,8 +181,8 @@ export default async function fileRoutes(server: FastifyInstance) {
|
||||
})
|
||||
|
||||
server.post("/files/presigned/:id?", async (req, reply) => {
|
||||
const { id } = req.params as { key: string };
|
||||
const { ids } = req.body as { keys: string[] }
|
||||
const { id } = req.params as { id: string };
|
||||
const { ids } = req.body as { ids: string[] }
|
||||
|
||||
if(id) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user