2022-09-22 16:16:04 +08:00
|
|
|
package router
|
|
|
|
|
|
|
|
import (
|
2022-10-17 16:32:31 +08:00
|
|
|
v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1"
|
|
|
|
"github.com/1Panel-dev/1Panel/backend/middleware"
|
2022-09-22 16:16:04 +08:00
|
|
|
"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
|
|
|
|
{
|
2022-10-11 16:27:58 +08:00
|
|
|
appRouter.POST("/sync", baseApi.SyncApp)
|
|
|
|
appRouter.POST("/search", baseApi.SearchApp)
|
2023-02-08 17:09:21 +08:00
|
|
|
appRouter.GET("/:key", baseApi.GetApp)
|
2022-11-03 17:06:48 +08:00
|
|
|
appRouter.GET("/detail/:appId/:version", baseApi.GetAppDetail)
|
2022-09-26 16:32:40 +08:00
|
|
|
appRouter.POST("/install", baseApi.InstallApp)
|
2023-01-16 15:30:24 +08:00
|
|
|
appRouter.GET("/tags", baseApi.GetAppTags)
|
2022-10-13 18:56:53 +08:00
|
|
|
appRouter.GET("/installed/:appInstallId/versions", baseApi.GetUpdateVersions)
|
2022-11-22 22:47:38 +08:00
|
|
|
appRouter.GET("/installed/check/:key", baseApi.CheckAppInstalled)
|
2022-12-04 19:20:36 +08:00
|
|
|
appRouter.GET("/installed/loadport/:key", baseApi.LoadPort)
|
2022-12-20 20:30:14 +08:00
|
|
|
appRouter.GET("/installed/loadpassword/:key", baseApi.LoadPassword)
|
2022-12-01 19:25:02 +08:00
|
|
|
appRouter.GET("/installed/delete/check/:appInstallId", baseApi.DeleteCheck)
|
2022-11-18 14:27:40 +08:00
|
|
|
appRouter.POST("/installed", baseApi.SearchAppInstalled)
|
2022-10-11 16:27:58 +08:00
|
|
|
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)
|
2022-11-08 14:34:41 +08:00
|
|
|
appRouter.POST("/installed/port/change", baseApi.ChangeAppPort)
|
2022-10-07 15:49:39 +08:00
|
|
|
appRouter.GET("/services/:key", baseApi.GetServices)
|
2022-12-09 17:16:07 +08:00
|
|
|
appRouter.GET("/installed/conf/:key", baseApi.GetDefaultConfig)
|
2023-01-03 14:57:13 +08:00
|
|
|
appRouter.GET("/installed/params/:appInstallId", baseApi.GetParams)
|
2022-09-22 16:16:04 +08:00
|
|
|
}
|
|
|
|
}
|