chore: build
ci-web / test (push) Canceled after 0s
ci-api / test (push) Successful in 23m8s

This commit is contained in:
Xor290
2026-10-04 17:39:39 +02:00
parent 4bb8c143e2
commit 89bf45f738
21 changed files with 2974 additions and 1537 deletions
@@ -25,6 +25,7 @@ type Deps struct {
AuthH *auth.Handler
DemosH *demos.Handler
ProjectsH *projects.Handler
RequestsH *projects.RequestHandler
SubH *sub.Handler
ProfileH *profile.Handler
DownloadsH *downloads.Handler
@@ -88,6 +89,14 @@ func New(d Deps) *gin.Engine {
if d.DemosH != nil {
client.GET("/demos/mine", d.DemosH.ListMine)
}
// Un client demande un site vitrine puis suit ses demandes et ses sites.
if d.RequestsH != nil {
client.POST("/project-requests", httpx.RateLimit(0.2, 5), d.RequestsH.Create)
client.GET("/project-requests/mine", d.RequestsH.ListMine)
}
if d.ProjectsH != nil {
client.GET("/projects/mine", d.ProjectsH.ListMine)
}
if d.DownloadsH != nil {
client.GET("/apps", d.DownloadsH.List)
client.GET("/apps/:name", d.DownloadsH.Download)
@@ -122,6 +131,11 @@ func New(d Deps) *gin.Engine {
admin.POST("/projects/:id/extend", d.ProjectsH.Extend)
admin.POST("/projects/:id/domain", d.ProjectsH.SetDomain)
}
if d.RequestsH != nil {
admin.GET("/project-requests", d.RequestsH.List)
admin.POST("/project-requests/:id/approve", d.RequestsH.Approve)
admin.POST("/project-requests/:id/reject", d.RequestsH.Reject)
}
}
return r