summaryrefslogtreecommitdiff
path: root/internal/client/router.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@protonmail.com>2021-03-02 22:52:31 +0100
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2021-03-02 22:52:31 +0100
commitbe1b631681ae1bc588c9002f1bedfcc01a7bb153 (patch)
tree5d66376080520cba36b7e53b5090ae12216cedc4 /internal/client/router.go
parentstart implementing db interface (diff)
downloadgotosocial-be1b631681ae1bc588c9002f1bedfcc01a7bb153.tar.xz
More messing around
Diffstat (limited to 'internal/client/router.go')
-rw-r--r--internal/client/router.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/client/router.go b/internal/client/router.go
index cf00419c5..0cedcd0dc 100644
--- a/internal/client/router.go
+++ b/internal/client/router.go
@@ -22,7 +22,7 @@ import "github.com/gin-gonic/gin"
// Router provides the http routes used by the API
type Router interface {
- Route()
+ Route() error
}
// NewRouter returns a new router
@@ -34,7 +34,7 @@ func NewRouter() Router {
type router struct {
}
-func (r *router) Route() {
+func (r *router) Route() error {
ginRouter := gin.Default()
ginRouter.LoadHTMLGlob("web/template/*")
@@ -44,5 +44,6 @@ func (r *router) Route() {
statusesGroup := v1.Group("/statuses")
statusesGroup.GET(":id", statusGet)
- ginRouter.Run()
+ err := ginRouter.Run()
+ return err
}