refactor: structure of api-router directory

This commit is contained in:
0xJacky 2023-11-27 23:53:23 +08:00
parent d272f7900f
commit 50b4fbcda4
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
38 changed files with 610 additions and 524 deletions

20
api/system/router.go Normal file
View file

@ -0,0 +1,20 @@
package system
import (
"github.com/gin-gonic/gin"
)
func InitPublicRouter(r *gin.RouterGroup) {
r.GET("install", InstallLockCheck)
r.POST("install", InstallNginxUI)
r.GET("translation/:code", GetTranslation)
}
func InitPrivateRouter(r *gin.RouterGroup) {
r.GET("settings", GetSettings)
r.POST("settings", SaveSettings)
r.GET("upgrade/release", GetRelease)
r.GET("upgrade/current", GetCurrentVersion)
r.GET("upgrade/perform", PerformCoreUpgrade)
}