From f23ab102396d0ae11811ccc452a1e31627c781b3 Mon Sep 17 00:00:00 2001 From: Reindert Vetter Date: Sun, 15 Nov 2020 23:42:00 +0100 Subject: [PATCH] lanvard/lanvard#73 init web and api controllers --- {src/controller => app/http/controllers}/homepage.go | 2 +- {src/controller => app/http/controllers}/ping.go | 2 +- routes/api.go | 4 ++-- routes/web.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename {src/controller => app/http/controllers}/homepage.go (92%) rename {src/controller => app/http/controllers}/ping.go (92%) diff --git a/src/controller/homepage.go b/app/http/controllers/homepage.go similarity index 92% rename from src/controller/homepage.go rename to app/http/controllers/homepage.go index 33f3163..b1734ca 100644 --- a/src/controller/homepage.go +++ b/app/http/controllers/homepage.go @@ -1,4 +1,4 @@ -package controller +package controllers import ( "github.com/lanvard/contract/inter" diff --git a/src/controller/ping.go b/app/http/controllers/ping.go similarity index 92% rename from src/controller/ping.go rename to app/http/controllers/ping.go index a11bc6b..97b1e8a 100644 --- a/src/controller/ping.go +++ b/app/http/controllers/ping.go @@ -1,4 +1,4 @@ -package controller +package controllers import ( "github.com/lanvard/contract/inter" diff --git a/routes/api.go b/routes/api.go index cb05def..b8ff4de 100644 --- a/routes/api.go +++ b/routes/api.go @@ -2,8 +2,8 @@ package routes import ( . "github.com/lanvard/routing" + "lanvard/app/http/controllers" "lanvard/app/http/middleware" - "lanvard/src/controller" ) /* @@ -20,5 +20,5 @@ import ( */ var Api = Group( - Get("/ping", controller.Ping), + Get("/ping", controllers.Ping), ).Prefix("/api").Middleware(middleware.Api...) diff --git a/routes/web.go b/routes/web.go index 3eb8e97..c6bbd68 100644 --- a/routes/web.go +++ b/routes/web.go @@ -2,8 +2,8 @@ package routes import ( . "github.com/lanvard/routing" + "lanvard/app/http/controllers" "lanvard/app/http/middleware" - "lanvard/src/controller" ) /* @@ -17,5 +17,5 @@ import ( | */ var Web = Group( - Get("/", controller.Homepage), + Get("/", controllers.Homepage), ).Middleware(middleware.Web...)