We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2e1e407 + b2d687f commit 891b0b4Copy full SHA for 891b0b4
1 file changed
internal/api/api.go
@@ -160,6 +160,12 @@ func (a *API) handleAddDocuments(c echo.Context) error {
160
log.Debug().Err(err).Msg("handleAddDocuments Bind err")
161
return echo.NewHTTPError(http.StatusBadRequest)
162
}
163
+
164
+ log.Debug().Interface("docs", docs).Msg("before validating")
165
+ if len(docs.Documents) == 0 {
166
+ return c.JSON(http.StatusOK, docs)
167
+ }
168
169
if err = c.Validate(docs); err != nil {
170
log.Debug().Err(err).Msg("handleAddDocuments Validate err")
171
0 commit comments