v0.0.316 bugfix sorting
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 2m14s

This commit is contained in:
Timo Vetter 2023-11-13 15:19:48 +01:00
parent fa6d73301e
commit d1f9069f2f
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
package goext
const GoextVersion = "0.0.315"
const GoextVersion = "0.0.316"
const GoextVersionTimestamp = "2023-11-12T03:10:55+0100"
const GoextVersionTimestamp = "2023-11-13T15:19:48+0100"

View File

@ -42,8 +42,8 @@ func (c *Coll[TData]) Paginate(ctx context.Context, filter pag.Filter, page int,
pipelineCount := mongo.Pipeline{}
pipelineCount = append(pipelineCount, bson.D{{Key: "$count", Value: "count"}})
pipelineList := langext.ArrConcat(mongo.Pipeline{}, pipelineFilter, pipelinePaginate, c.extraModPipeline)
pipelineTotalCount := langext.ArrConcat(mongo.Pipeline{}, pipelineFilter, pipelineCount)
pipelineList := langext.ArrConcat(pipelineFilter, pipelineSort, pipelinePaginate, c.extraModPipeline)
pipelineTotalCount := langext.ArrConcat(pipelineFilter, pipelineCount)
cursorList, err := c.coll.Aggregate(ctx, pipelineList)
if err != nil {