feat: add app download
ci-api / test (push) Successful in 27m41s
ci-web / test (push) Successful in 14m6s

This commit is contained in:
Xor290
2026-08-09 15:35:29 +02:00
parent 0609ca30d0
commit d8794358c5
13 changed files with 520 additions and 24 deletions
+13 -7
View File
@@ -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("")