0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-04 22:57:34 -04:00
This commit is contained in:
Lunny Xiao 2025-06-20 17:43:36 -07:00
parent 01a0b8af2d
commit 49e9ab0039
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
3 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,7 @@ package v1_25 //nolint
import (
"code.gitea.io/gitea/modules/timeutil"
"xorm.io/xorm"
"xorm.io/xorm/schemas"
)

View File

@ -11,6 +11,7 @@ import (
"strconv"
"strings"
activities_model "code.gitea.io/gitea/models/activities"
"code.gitea.io/gitea/models/db"
git_model "code.gitea.io/gitea/models/git"
"code.gitea.io/gitea/models/renderhelper"
@ -31,7 +32,6 @@ import (
"code.gitea.io/gitea/services/context/upload"
"code.gitea.io/gitea/services/forms"
release_service "code.gitea.io/gitea/services/release"
activities_model "code.gitea.io/gitea/models/activities"
)
const (

View File

@ -252,13 +252,13 @@ func TestAPICommitNotification(t *testing.T) {
req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/new_commit_notification.txt", user2.Name, repo1.Name), &createFileOptions).
AddTokenAuth(token1)
resp := MakeRequest(t, req, http.StatusCreated)
MakeRequest(t, req, http.StatusCreated)
// Check notifications are as expected
token2 := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteNotification)
req = NewRequest(t, "GET", "/api/v1/notifications?all=true").
AddTokenAuth(token2)
resp = MakeRequest(t, req, http.StatusOK)
resp := MakeRequest(t, req, http.StatusOK)
var apiNL []api.NotificationThread
DecodeJSON(t, resp, &apiNL)