Ajouter pointers à clients en paramètres à apihandler.New
This commit is contained in:
parent
682d8fc6aa
commit
6123799650
2 changed files with 11 additions and 6 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Reference in a new issue