mirror of https://github.com/1Panel-dev/1Panel
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.6 KiB
40 lines
1.6 KiB
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)
|
|
appRouter.GET("/:id", baseApi.GetApp)
|
|
appRouter.GET("/detail/:appId/:version", baseApi.GetAppDetail)
|
|
appRouter.POST("/install", baseApi.InstallApp)
|
|
appRouter.GET("/tags", baseApi.GetAppTags)
|
|
appRouter.GET("/installed/:appInstallId/versions", baseApi.GetUpdateVersions)
|
|
appRouter.GET("/installed/check/:key", baseApi.CheckAppInstalled)
|
|
appRouter.GET("/installed/loadport/:key", baseApi.LoadPort)
|
|
appRouter.GET("/installed/loadpassword/:key", baseApi.LoadPassword)
|
|
appRouter.GET("/installed/delete/check/:appInstallId", baseApi.DeleteCheck)
|
|
appRouter.POST("/installed", baseApi.SearchAppInstalled)
|
|
appRouter.POST("/installed/op", baseApi.OperateInstalled)
|
|
appRouter.POST("/installed/sync", baseApi.SyncInstalled)
|
|
appRouter.POST("/installed/backups", baseApi.SearchInstalledBackup)
|
|
appRouter.POST("/installed/backups/del", baseApi.DeleteAppBackup)
|
|
appRouter.POST("/installed/port/change", baseApi.ChangeAppPort)
|
|
appRouter.GET("/services/:key", baseApi.GetServices)
|
|
appRouter.GET("/installed/conf/:key", baseApi.GetDefaultConfig)
|
|
appRouter.GET("/installed/params/:appInstallId", baseApi.GetParams)
|
|
}
|
|
}
|