Fix incorrect oldest sort in project list (#25806)

sort type `oldest` should be `Asc`.
Added a test for this.
This commit is contained in:
yp05327 2023-07-12 03:47:50 +09:00 committed by GitHub
parent 491cc06ffe
commit 44572e9243
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 64 additions and 15 deletions

View file

@ -62,7 +62,7 @@ func Projects(ctx *context.Context) {
OwnerID: ctx.ContextUser.ID,
Page: page,
IsClosed: util.OptionalBoolOf(isShowClosed),
SortType: sortType,
OrderBy: project_model.GetSearchOrderByBySortType(sortType),
Type: projectType,
})
if err != nil {

View file

@ -74,7 +74,7 @@ func Projects(ctx *context.Context) {
RepoID: repo.ID,
Page: page,
IsClosed: util.OptionalBoolOf(isShowClosed),
SortType: sortType,
OrderBy: project_model.GetSearchOrderByBySortType(sortType),
Type: project_model.TypeRepository,
})
if err != nil {