web: small fixes - mainly in docs
continuous-integration/drone the build is pending
Details
continuous-integration/drone the build is pending
Details
This commit is contained in:
parent
b10fc5b588
commit
fb766ca32b
|
@ -26,6 +26,7 @@ type Status struct {
|
||||||
Extras interface{} `json:"extras,omitempty"`
|
Extras interface{} `json:"extras,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Register status module
|
||||||
// @Summary Show Status of current API
|
// @Summary Show Status of current API
|
||||||
// @Description Show version and status
|
// @Description Show version and status
|
||||||
// @Tags status
|
// @Tags status
|
||||||
|
|
|
@ -14,10 +14,8 @@ var (
|
||||||
func TestRun(t *testing.T) {
|
func TestRun(t *testing.T) {
|
||||||
assert := assert.New(t)
|
assert := assert.New(t)
|
||||||
|
|
||||||
ModuleRegister(func(_ *gin.Engine, _ *Service) {
|
|
||||||
})
|
|
||||||
|
|
||||||
s := &Service{AccessLog: true, Listen: "8.8.8.8:80"}
|
s := &Service{AccessLog: true, Listen: "8.8.8.8:80"}
|
||||||
|
s.ModuleRegister(func(_ *gin.Engine, _ *Service) {})
|
||||||
// HTTP - failed
|
// HTTP - failed
|
||||||
err := s.Run()
|
err := s.Run()
|
||||||
assert.Error(err)
|
assert.Error(err)
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
// LoadSessions starts session handling for s.
|
// LoadSession starts session handling for s.
|
||||||
func (s *Service) LoadSession(r *gin.Engine) {
|
func (s *Service) LoadSession(r *gin.Engine) {
|
||||||
store := cookie.NewStore([]byte(s.Session.Secret))
|
store := cookie.NewStore([]byte(s.Session.Secret))
|
||||||
r.Use(sessions.Sessions(s.Session.Name, store))
|
r.Use(sessions.Sessions(s.Session.Name, store))
|
||||||
|
|
Loading…
Reference in New Issue