feat: add app download
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/omnex/control-plane/api/internal/auth"
|
||||
"github.com/omnex/control-plane/api/internal/config"
|
||||
"github.com/omnex/control-plane/api/internal/demos"
|
||||
"github.com/omnex/control-plane/api/internal/downloads"
|
||||
"github.com/omnex/control-plane/api/internal/httpx"
|
||||
"github.com/omnex/control-plane/api/internal/profile"
|
||||
"github.com/omnex/control-plane/api/internal/session"
|
||||
@@ -17,13 +18,14 @@ import (
|
||||
|
||||
// Deps : dépendances injectées (facilite les tests).
|
||||
type Deps struct {
|
||||
Cfg config.Config
|
||||
Issuer *auth.Issuer
|
||||
Sessions session.Manager
|
||||
AuthH *auth.Handler
|
||||
DemosH *demos.Handler
|
||||
SubH *sub.Handler
|
||||
ProfileH *profile.Handler
|
||||
Cfg config.Config
|
||||
Issuer *auth.Issuer
|
||||
Sessions session.Manager
|
||||
AuthH *auth.Handler
|
||||
DemosH *demos.Handler
|
||||
SubH *sub.Handler
|
||||
ProfileH *profile.Handler
|
||||
DownloadsH *downloads.Handler
|
||||
}
|
||||
|
||||
// New construit l'engine Gin avec toute la chaîne de sécurité.
|
||||
@@ -61,6 +63,10 @@ func New(d Deps) *gin.Engine {
|
||||
if d.DemosH != nil {
|
||||
client.GET("/demos/mine", d.DemosH.ListMine)
|
||||
}
|
||||
if d.DownloadsH != nil {
|
||||
client.GET("/apps", d.DownloadsH.List)
|
||||
client.GET("/apps/:name", d.DownloadsH.Download)
|
||||
}
|
||||
}
|
||||
// Espace admin : provisioning des démos (admin uniquement).
|
||||
admin := authed.Group("")
|
||||
|
||||
Reference in New Issue
Block a user