feat(api): test doc upload

This commit is contained in:
neo-f
2023-03-23 22:28:17 +08:00
parent 6851fe95a0
commit 2d3cf0857a
7 changed files with 45 additions and 47 deletions

View File

@@ -34,13 +34,13 @@ func RegisterDocRouter(app *soda.Soda) {
AddJWTSecurity(JWTRequired).
SetParameters(schema.DocID{}).
AddJSONResponse(200, nil).OK()
app.Post("/docs/batch/delete", DeleteDoc).
app.Post("/docs/batch/delete", DeleteDocBatch).
AddTags("文档管理").
SetSummary("批量-文件删除").
AddJWTSecurity(JWTRequired).
SetJSONRequestBody(schema.DocsBatchDelete{}).
AddJSONResponse(200, schema.DocBatchResults{}).OK()
app.Post("/docs/batch/update", UpdateDoc).
app.Post("/docs/batch/update", UpdateDocBatch).
AddTags("文档管理").
SetSummary("批量-文件更新").
AddJWTSecurity(JWTRequired).
@@ -132,7 +132,7 @@ func CreateUploadURL(c *fiber.Ctx) error {
}
return c.JSON(schema.UploadURL{
URL: *u,
URL: u.String(),
ObjectName: objectName,
})
}