mirror of https://github.com/go-gitea/gitea.git
Fix lint
parent
7eebf0b5ed
commit
0baf8c5f32
|
|
@ -778,7 +778,7 @@ func GetRepositoriesIDsByFullNames(ctx context.Context, fullRepoNames []string)
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
var cond builder.Cond = builder.NewCond()
|
||||
cond := builder.NewCond()
|
||||
for _, name := range fullRepoNames {
|
||||
ownerName, repoName, ok := strings.Cut(name, "/")
|
||||
if !ok {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2025 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package code
|
||||
|
||||
import (
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ func TestAPISearchCodeNotLogin(t *testing.T) {
|
|||
|
||||
// test with no keyword
|
||||
req := NewRequest(t, "GET", "/api/v1/search/code")
|
||||
resp := MakeRequest(t, req, http.StatusUnprocessableEntity)
|
||||
MakeRequest(t, req, http.StatusUnprocessableEntity)
|
||||
|
||||
req = NewRequest(t, "GET", "/api/v1/search/code?q=Description")
|
||||
resp = MakeRequest(t, req, http.StatusOK)
|
||||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
var apiCodeSearchResults api.CodeSearchResults
|
||||
DecodeJSON(t, resp, &apiCodeSearchResults)
|
||||
|
|
|
|||
Loading…
Reference in New Issue