feat: create user, read users, batch delete users

This commit is contained in:
naiba
2024-10-22 21:19:30 +08:00
parent 73e3e4f3a1
commit 387da11f1b
7 changed files with 107 additions and 11 deletions

View File

@@ -63,17 +63,21 @@ func routers(r *gin.Engine) {
auth := api.Group("", authMiddleware.MiddlewareFunc())
auth.GET("/refresh_token", authMiddleware.RefreshHandler)
auth.POST("/server-group", commonHandler(newServerGroup))
auth.PATCH("/server-group/:id", commonHandler(editServerGroup))
auth.GET("/user", commonHandler(listUser))
auth.POST("/user", commonHandler(createUser))
auth.POST("/batch-delete/user", commonHandler(batchDeleteUser))
auth.POST("/server-group", commonHandler(createServerGroup))
auth.PATCH("/server-group/:id", commonHandler(updateServerGroup))
auth.POST("/batch-delete/server-group", commonHandler(batchDeleteServerGroup))
auth.PATCH("/server/:id", commonHandler(editServer))
auth.PATCH("/server/:id", commonHandler(updateServer))
auth.POST("/batch-delete/server", commonHandler(batchDeleteServer))
auth.GET("/ddns", commonHandler(listDDNS))
auth.GET("/ddns/providers", commonHandler(listProviders))
auth.POST("/ddns", commonHandler(newDDNS))
auth.PATCH("/ddns/:id", commonHandler(editDDNS))
auth.POST("/ddns", commonHandler(createDDNS))
auth.PATCH("/ddns/:id", commonHandler(updateDDNS))
auth.POST("/batch-delete/ddns", commonHandler(batchDeleteDDNS))
}