mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 11:42:24 -06:00
More messing around
This commit is contained in:
parent
d8e8d44d47
commit
be1b631681
7 changed files with 136 additions and 50 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue