Ajouter pointers à clients en paramètres à apihandler.New

This commit is contained in:
Victor Lacasse-Beaudoin 2023-09-16 17:44:38 -04:00
parent 682d8fc6aa
commit 6123799650
2 changed files with 11 additions and 6 deletions

View file

@ -17,8 +17,15 @@ func DeclareRoutes(e *echo.Group, h *APIHandler) {
e.GET("/scan/:membre_id/", h.ScanGET)
}
func New() (handler APIHandler) {
return
/*
New retourne un nouveau APIHandler contenant des pointers vers les clients
nécessaires à l'exécution du API server
*/
func New(bottinAPIClient *bottindata.ApiClient, dbClient *dbclient.DBClient) APIHandler {
return APIHandler{
BottinAPIClient: bottinAPIClient,
DBClient: dbClient,
}
}
/*