1
0

Fixed lint + fmt

This commit is contained in:
konrad
2018-07-10 14:02:23 +02:00
committed by kolaente
parent c8622b0029
commit 237874eda6
25 changed files with 94 additions and 70 deletions

View File

@ -1,3 +1,5 @@
package routes
// Package v1 List API.
//
// This documentation describes the List API.
@ -23,14 +25,13 @@
// in: header
//
// swagger:meta
package routes
import (
"github.com/labstack/echo"
"github.com/labstack/echo/middleware"
"git.kolaente.de/konrad/list/models"
CRUD "git.kolaente.de/konrad/list/routes/CRUD"
crud "git.kolaente.de/konrad/list/routes/crud"
apiv1 "git.kolaente.de/konrad/list/routes/api/v1"
_ "git.kolaente.de/konrad/list/routes/api/v1/swagger" // for docs generation
)
@ -50,7 +51,6 @@ func NewEcho() *echo.Echo {
// RegisterRoutes registers all routes for the application
func RegisterRoutes(e *echo.Echo) {
// TODO: Use proper cors middleware by echo
// Middleware for cors
@ -87,7 +87,7 @@ func RegisterRoutes(e *echo.Echo) {
a.Use(middleware.JWT(models.Config.JWTLoginSecret))
a.POST("/tokenTest", apiv1.CheckToken)
listHandler := &CRUD.CRUDWebHandler{
listHandler := &crud.WebHandler{
CObject: &models.List{},
}
a.GET("/lists", listHandler.ReadAllWeb)