1Panel/backend/router/ro_app.go

33 lines
1.1 KiB
Go
Raw Normal View History

package router
import (
v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1"
"github.com/1Panel-dev/1Panel/backend/middleware"
"github.com/gin-gonic/gin"
)
type AppRouter struct {
}
func (a *AppRouter) InitAppRouter(Router *gin.RouterGroup) {
appRouter := Router.Group("apps")
appRouter.Use(middleware.JwtAuth()).Use(middleware.SessionAuth())
baseApi := v1.ApiGroupApp.BaseApi
{
appRouter.POST("/sync", baseApi.SyncApp)
appRouter.POST("/search", baseApi.SearchApp)
2022-09-23 16:33:55 +08:00
appRouter.GET("/:id", baseApi.GetApp)
2022-11-03 17:06:48 +08:00
appRouter.GET("/detail/:appId/:version", baseApi.GetAppDetail)
appRouter.POST("/install", baseApi.InstallApp)
2022-10-13 18:56:53 +08:00
appRouter.GET("/installed/:appInstallId/versions", baseApi.GetUpdateVersions)
2022-11-18 14:27:40 +08:00
appRouter.POST("/installed", baseApi.SearchAppInstalled)
appRouter.POST("/installed/op", baseApi.OperateInstalled)
appRouter.POST("/installed/sync", baseApi.SyncInstalled)
2022-10-12 18:57:22 +08:00
appRouter.POST("/installed/backups", baseApi.SearchInstalledBackup)
appRouter.POST("/installed/backups/del", baseApi.DeleteAppBackup)
appRouter.POST("/installed/port/change", baseApi.ChangeAppPort)
2022-10-07 15:49:39 +08:00
appRouter.GET("/services/:key", baseApi.GetServices)
}
}