diff options
Diffstat (limited to 'internal/api/client/reports/reportsget_test.go')
-rw-r--r-- | internal/api/client/reports/reportsget_test.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/internal/api/client/reports/reportsget_test.go b/internal/api/client/reports/reportsget_test.go index c63d6c894..2413292a0 100644 --- a/internal/api/client/reports/reportsget_test.go +++ b/internal/api/client/reports/reportsget_test.go @@ -29,6 +29,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/api/client/reports" apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" + apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/oauth" @@ -61,21 +62,21 @@ func (suite *ReportsGetTestSuite) getReports( ctx.Set(oauth.SessionAuthorizedUser, user) // create the request URI - requestPath := reports.BasePath + "?" + reports.LimitKey + "=" + strconv.Itoa(limit) + requestPath := reports.BasePath + "?" + apiutil.LimitKey + "=" + strconv.Itoa(limit) if resolved != nil { - requestPath = requestPath + "&" + reports.ResolvedKey + "=" + strconv.FormatBool(*resolved) + requestPath = requestPath + "&" + apiutil.ResolvedKey + "=" + strconv.FormatBool(*resolved) } if targetAccountID != "" { - requestPath = requestPath + "&" + reports.TargetAccountIDKey + "=" + targetAccountID + requestPath = requestPath + "&" + apiutil.TargetAccountIDKey + "=" + targetAccountID } if maxID != "" { - requestPath = requestPath + "&" + reports.MaxIDKey + "=" + maxID + requestPath = requestPath + "&" + apiutil.MaxIDKey + "=" + maxID } if sinceID != "" { - requestPath = requestPath + "&" + reports.SinceIDKey + "=" + sinceID + requestPath = requestPath + "&" + apiutil.SinceIDKey + "=" + sinceID } if minID != "" { - requestPath = requestPath + "&" + reports.MinIDKey + "=" + minID + requestPath = requestPath + "&" + apiutil.MinIDKey + "=" + minID } baseURI := config.GetProtocol() + "://" + config.GetHost() requestURI := baseURI + "/api/" + requestPath |