chore: update
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"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/projects"
|
||||
"github.com/omnex/control-plane/api/internal/session"
|
||||
"github.com/omnex/control-plane/api/internal/sub"
|
||||
)
|
||||
@@ -23,6 +24,7 @@ type Deps struct {
|
||||
Sessions session.Manager
|
||||
AuthH *auth.Handler
|
||||
DemosH *demos.Handler
|
||||
ProjectsH *projects.Handler
|
||||
SubH *sub.Handler
|
||||
ProfileH *profile.Handler
|
||||
DownloadsH *downloads.Handler
|
||||
@@ -111,6 +113,13 @@ func New(d Deps) *gin.Engine {
|
||||
admin.POST("/demos/:id/premium", d.DemosH.TransferToPremium)
|
||||
admin.POST("/demos/details", d.DemosH.ListDetails)
|
||||
}
|
||||
if d.ProjectsH != nil {
|
||||
admin.POST("/projects", d.ProjectsH.Create)
|
||||
admin.GET("/projects", d.ProjectsH.List)
|
||||
admin.GET("/projects/:id", d.ProjectsH.Get)
|
||||
admin.DELETE("/projects/:id", d.ProjectsH.Delete)
|
||||
admin.POST("/projects/:id/extend", d.ProjectsH.Extend)
|
||||
}
|
||||
}
|
||||
|
||||
return r
|
||||
|
||||
Reference in New Issue
Block a user