Merge pull request 'Renommer handler packages pour suivre les naming conventions de go' (#174) from rename/packages-gonamingconvention into main

Reviewed-on: #174
This commit is contained in:
Victor Lacasse-Beaudoin 2023-11-20 14:25:00 -05:00
commit b8d0341db2
4 changed files with 16 additions and 16 deletions

View file

@ -14,7 +14,7 @@ ADD cmd/ cmd/
ADD api/ api/ ADD api/ api/
ADD api_handlers/ api_handlers/ ADD apihandler/ apihandler/
ADD apiresponse/ apiresponse/ ADD apiresponse/ apiresponse/
@ -28,7 +28,7 @@ ADD templates/ templates/
ADD version/ version/ ADD version/ version/
ADD web_handlers/ web_handlers/ ADD webhandler/ webhandler/
Add webresponse/ webresponse/ Add webresponse/ webresponse/

View file

@ -1,4 +1,4 @@
package api_handlers package apihandler
import ( import (
"context" "context"

View file

@ -18,12 +18,12 @@ import (
"github.com/spf13/viper" "github.com/spf13/viper"
"git.agecem.com/agecem/agecem-org/api" "git.agecem.com/agecem/agecem-org/api"
"git.agecem.com/agecem/agecem-org/api_handlers" "git.agecem.com/agecem/agecem-org/apihandler"
"git.agecem.com/agecem/agecem-org/config" "git.agecem.com/agecem/agecem-org/config"
"git.agecem.com/agecem/agecem-org/media" "git.agecem.com/agecem/agecem-org/media"
"git.agecem.com/agecem/agecem-org/public" "git.agecem.com/agecem/agecem-org/public"
"git.agecem.com/agecem/agecem-org/templates" "git.agecem.com/agecem/agecem-org/templates"
"git.agecem.com/agecem/agecem-org/web_handlers" "git.agecem.com/agecem/agecem-org/webhandler"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware" "github.com/labstack/echo/v4/middleware"
) )
@ -205,7 +205,7 @@ func RunServer() {
log.Fatal("Error during NewMediaClientFromViper for API handlers") log.Fatal("Error during NewMediaClientFromViper for API handlers")
} }
v1Handler := api_handlers.V1Handler{ v1Handler := apihandler.V1Handler{
Config: cfg, Config: cfg,
MediaClient: mediaClient, MediaClient: mediaClient,
} }
@ -235,25 +235,25 @@ func RunServer() {
log.Fatal(err) log.Fatal(err)
} }
webHandler := web_handlers.WebHandler{ webHandler := webhandler.WebHandler{
ApiClient: apiClient, ApiClient: apiClient,
} }
e.GET("/", web_handlers.HandleIndex) e.GET("/", webhandler.HandleIndex)
//e.GET("/a-propos", web_handlers.HandleAPropos) //e.GET("/a-propos", webhandler.HandleAPropos)
//e.GET("/actualite", web_handlers.HandleActualite) //e.GET("/actualite", webhandler.HandleActualite)
//e.GET("/actualite/:article", web_handlers.HandleActualiteArticle) //e.GET("/actualite/:article", webhandler.HandleActualiteArticle)
e.GET("/vie-etudiante", web_handlers.HandleVieEtudiante) e.GET("/vie-etudiante", webhandler.HandleVieEtudiante)
e.GET("/vie-etudiante/:organisme", web_handlers.HandleVieEtudianteOrganisme) e.GET("/vie-etudiante/:organisme", webhandler.HandleVieEtudianteOrganisme)
e.GET("/documentation", webHandler.HandleDocumentation) e.GET("/documentation", webHandler.HandleDocumentation)
e.GET("/formulaires", web_handlers.HandleFormulaires) e.GET("/formulaires", webhandler.HandleFormulaires)
// Public Routes // Public Routes
@ -261,7 +261,7 @@ func RunServer() {
// Admin Routes // Admin Routes
groupAdmin.GET("", web_handlers.HandleAdmin) groupAdmin.GET("", webhandler.HandleAdmin)
groupAdmin.GET("/documents/upload", webHandler.HandleAdminDocumentsUpload) groupAdmin.GET("/documents/upload", webHandler.HandleAdminDocumentsUpload)

View file

@ -1,4 +1,4 @@
package web_handlers package webhandler
import ( import (
"fmt" "fmt"