go fmt, fix typo
This commit is contained in:
parent
de66eb900f
commit
8041fd04e1
|
@ -27,7 +27,6 @@ import (
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/api/client/timeline"
|
"github.com/superseriousbusiness/gotosocial/internal/api/client/timeline"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/api/s2s/user"
|
"github.com/superseriousbusiness/gotosocial/internal/api/s2s/user"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/api/s2s/webfinger"
|
"github.com/superseriousbusiness/gotosocial/internal/api/s2s/webfinger"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/web/base"
|
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/api/security"
|
"github.com/superseriousbusiness/gotosocial/internal/api/security"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/blob"
|
"github.com/superseriousbusiness/gotosocial/internal/blob"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/cliactions"
|
"github.com/superseriousbusiness/gotosocial/internal/cliactions"
|
||||||
|
@ -44,6 +43,7 @@ import (
|
||||||
timelineprocessing "github.com/superseriousbusiness/gotosocial/internal/timeline"
|
timelineprocessing "github.com/superseriousbusiness/gotosocial/internal/timeline"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/transport"
|
"github.com/superseriousbusiness/gotosocial/internal/transport"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
|
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
|
||||||
|
"github.com/superseriousbusiness/gotosocial/internal/web/base"
|
||||||
)
|
)
|
||||||
|
|
||||||
var models []interface{} = []interface{}{
|
var models []interface{} = []interface{}{
|
||||||
|
|
|
@ -26,7 +26,7 @@ import (
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/router"
|
"github.com/superseriousbusiness/gotosocial/internal/router"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Module sruct {
|
type Module struct {
|
||||||
config *config.Config
|
config *config.Config
|
||||||
log *logrus.Logger
|
log *logrus.Logger
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ type Module sruct {
|
||||||
func New(config *config.Config, log *logrus.Logger) {
|
func New(config *config.Config, log *logrus.Logger) {
|
||||||
return &Module{
|
return &Module{
|
||||||
config: config,
|
config: config,
|
||||||
log: log
|
log: log,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,12 +43,12 @@ func (m *Module) Route(s router.Router) error {
|
||||||
l := m.log.WithField("func", "BaseGETHandler")
|
l := m.log.WithField("func", "BaseGETHandler")
|
||||||
|
|
||||||
// serve static files from /assets
|
// serve static files from /assets
|
||||||
assetPath := filepath.Join(cwd, m.config.TemplateConfig.AssetBaseDir);
|
assetPath := filepath.Join(cwd, m.config.TemplateConfig.AssetBaseDir)
|
||||||
s.Static("/assets", assetPath);
|
s.Static("/assets", assetPath)
|
||||||
|
|
||||||
// serve front-page
|
// serve front-page
|
||||||
s.GET("/", func(c *gin.Context) {
|
s.GET("/", func(c *gin.Context) {
|
||||||
l.Trace("serving index html");
|
l.Trace("serving index html")
|
||||||
// FIXME: actual variables
|
// FIXME: actual variables
|
||||||
c.HTML(http.StatusOK, "index.tmpl", gin.H{
|
c.HTML(http.StatusOK, "index.tmpl", gin.H{
|
||||||
"instancename": "GoToSocial Test Instance",
|
"instancename": "GoToSocial Test Instance",
|
||||||
|
@ -56,7 +56,7 @@ func (m *Module) Route(s router.Router) error {
|
||||||
"countStatuses": 42069,
|
"countStatuses": 42069,
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"adminUsername": "@admin",
|
"adminUsername": "@admin",
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue