feat: terminal api

This commit is contained in:
naiba
2024-10-22 22:01:01 +08:00
parent 387da11f1b
commit f99edfd7bd
7 changed files with 121 additions and 478 deletions

View File

@@ -61,8 +61,12 @@ func routers(r *gin.Engine) {
optionalAuth.GET("/server-group", commonHandler(listServerGroup))
auth := api.Group("", authMiddleware.MiddlewareFunc())
auth.GET("/refresh_token", authMiddleware.RefreshHandler)
auth.POST("/terminal", commonHandler(createTerminal))
auth.GET("/ws/terminal/:id", commonHandler(terminalStream))
auth.GET("/user", commonHandler(listUser))
auth.POST("/user", commonHandler(createUser))
auth.POST("/batch-delete/user", commonHandler(batchDeleteUser))