1Panel/backend/router/ro_app.go

40 lines
1.6 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 08:33:55 +00:00
appRouter.GET("/:id", baseApi.GetApp)
2022-11-03 09:06:48 +00:00
appRouter.GET("/detail/:appId/:version", baseApi.GetAppDetail)
appRouter.POST("/install", baseApi.InstallApp)
2023-01-16 07:30:24 +00:00
appRouter.GET("/tags", baseApi.GetAppTags)
2022-10-13 10:56:53 +00:00
appRouter.GET("/installed/:appInstallId/versions", baseApi.GetUpdateVersions)
2022-11-22 14:47:38 +00:00
appRouter.GET("/installed/check/:key", baseApi.CheckAppInstalled)
appRouter.GET("/installed/loadport/:key", baseApi.LoadPort)
2022-12-20 12:30:14 +00:00
appRouter.GET("/installed/loadpassword/:key", baseApi.LoadPassword)
2022-12-01 11:25:02 +00:00
appRouter.GET("/installed/delete/check/:appInstallId", baseApi.DeleteCheck)
2022-11-18 06:27:40 +00:00
appRouter.POST("/installed", baseApi.SearchAppInstalled)
appRouter.POST("/installed/op", baseApi.OperateInstalled)
appRouter.POST("/installed/sync", baseApi.SyncInstalled)
2022-10-12 10:57:22 +00:00
appRouter.POST("/installed/backups", baseApi.SearchInstalledBackup)
appRouter.POST("/installed/backups/del", baseApi.DeleteAppBackup)
appRouter.POST("/installed/port/change", baseApi.ChangeAppPort)
2022-10-07 07:49:39 +00:00
appRouter.GET("/services/:key", baseApi.GetServices)
2022-12-09 09:16:07 +00:00
appRouter.GET("/installed/conf/:key", baseApi.GetDefaultConfig)
appRouter.GET("/installed/params/:appInstallId", baseApi.GetParams)
}
}