feat: Add JWT_SECRET configuration to .env.example and enhance pagination validation in chunk handler

This commit is contained in:
wizardchen
2025-11-26 17:58:31 +08:00
parent b4ae609103
commit d41f8afe55
5 changed files with 37 additions and 8 deletions
+9
View File
@@ -98,6 +98,15 @@ func (h *ChunkHandler) ListKnowledgeChunks(c *gin.Context) {
c.Error(errors.NewBadRequestError(err.Error()))
return
}
if pagination.Page < 1 {
pagination.Page = 1
}
if pagination.PageSize < 1 {
pagination.PageSize = 10
}
if pagination.PageSize > 100 {
pagination.PageSize = 100
}
chunkType := []types.ChunkType{types.ChunkTypeText}