summaryrefslogtreecommitdiff
path: root/internal/api/client/search/search.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-07-31 15:47:35 +0200
committerLibravatar GitHub <noreply@github.com>2023-07-31 15:47:35 +0200
commit2796a2e82f16ade9872008878cf88299bd66b4e7 (patch)
tree76f7b69cc1da57ca10b71c57abf1892575bea100 /internal/api/client/search/search.go
parent[performance] cache follow, follow request and block ID lists (#2027) (diff)
downloadgotosocial-2796a2e82f16ade9872008878cf88299bd66b4e7.tar.xz
[feature] Hashtag federation (in/out), hashtag client API endpoints (#2032)
* update go-fed * do the things * remove unused columns from tags * update to latest lingo from main * further tag shenanigans * serve stub page at tag endpoint * we did it lads * tests, oh tests, ohhh tests, oh tests (doo doo doo doo) * swagger docs * document hashtag usage + federation * instanceGet * don't bother parsing tag href * rename whereStartsWith -> whereStartsLike * remove GetOrCreateTag * dont cache status tag timelineability
Diffstat (limited to 'internal/api/client/search/search.go')
-rw-r--r--internal/api/client/search/search.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/api/client/search/search.go b/internal/api/client/search/search.go
index 219e30280..d413aff91 100644
--- a/internal/api/client/search/search.go
+++ b/internal/api/client/search/search.go
@@ -21,12 +21,12 @@ import (
"net/http"
"github.com/gin-gonic/gin"
+ apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util"
"github.com/superseriousbusiness/gotosocial/internal/processing"
)
const (
- BasePathV1 = "/v1/search" // Base path for serving v1 of the search API, minus the 'api' prefix.
- BasePathV2 = "/v2/search" // Base path for serving v2 of the search API, minus the 'api' prefix.
+ BasePath = "/:" + apiutil.APIVersionKey + "/search"
)
type Module struct {
@@ -40,6 +40,5 @@ func New(processor *processing.Processor) *Module {
}
func (m *Module) Route(attachHandler func(method string, path string, f ...gin.HandlerFunc) gin.IRoutes) {
- attachHandler(http.MethodGet, BasePathV1, m.SearchGETHandler)
- attachHandler(http.MethodGet, BasePathV2, m.SearchGETHandler)
+ attachHandler(http.MethodGet, BasePath, m.SearchGETHandler)
}