Renames and dots in comments
This commit is contained in:
@ -15,7 +15,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// Handler handles incoming requests
|
||||
// Handler handles incoming requests.
|
||||
type Handler struct {
|
||||
Service *postgres.Database
|
||||
TokenVerifier budgeteer.TokenVerifier
|
||||
@ -23,7 +23,7 @@ type Handler struct {
|
||||
StaticFS http.FileSystem
|
||||
}
|
||||
|
||||
// Serve starts the http server
|
||||
// Serve starts the http server.
|
||||
func (h *Handler) Serve() {
|
||||
router := gin.Default()
|
||||
h.LoadRoutes(router)
|
||||
@ -33,7 +33,7 @@ func (h *Handler) Serve() {
|
||||
}
|
||||
}
|
||||
|
||||
// LoadRoutes initializes all the routes
|
||||
// LoadRoutes initializes all the routes.
|
||||
func (h *Handler) LoadRoutes(router *gin.Engine) {
|
||||
router.Use(enableCachingForStaticFiles())
|
||||
router.NoRoute(h.ServeStatic)
|
||||
@ -73,6 +73,7 @@ func (h *Handler) LoadRoutes(router *gin.Engine) {
|
||||
transaction.POST("/new", h.newTransaction)
|
||||
transaction.POST("/:transactionid", h.newTransaction)
|
||||
}
|
||||
|
||||
func (h *Handler) ServeStatic(c *gin.Context) {
|
||||
h.ServeStaticFile(c, c.Request.URL.Path)
|
||||
}
|
||||
|
Reference in New Issue
Block a user