Refactor: Rename NanoKVM to BatchuKVM and update server URL
This commit is contained in:
25
server/router/extensions.go
Normal file
25
server/router/extensions.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"NanoKVM-Server/middleware"
|
||||
"NanoKVM-Server/service/extensions/tailscale"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func extensionsRouter(r *gin.Engine) {
|
||||
api := r.Group("/api/extensions").Use(middleware.CheckToken())
|
||||
|
||||
ts := tailscale.NewService()
|
||||
|
||||
api.POST("/tailscale/install", ts.Install) // install tailscale
|
||||
api.POST("/tailscale/uninstall", ts.Uninstall) // uninstall tailscale
|
||||
api.GET("/tailscale/status", ts.GetStatus) // get tailscale status
|
||||
api.POST("/tailscale/up", ts.Up) // run tailscale up
|
||||
api.POST("/tailscale/down", ts.Down) // run tailscale down
|
||||
api.POST("/tailscale/login", ts.Login) // tailscale login
|
||||
api.POST("/tailscale/logout", ts.Logout) // tailscale logout
|
||||
api.POST("/tailscale/start", ts.Start) // tailscale start
|
||||
api.POST("/tailscale/stop", ts.Stop) // tailscale stop
|
||||
api.POST("/tailscale/restart", ts.Restart) // tailscale restart
|
||||
}
|
||||
Reference in New Issue
Block a user