feat:完善项目

This commit is contained in:
henry
2021-11-08 11:09:27 +08:00
parent 85b58968d1
commit 1502076841
20 changed files with 397 additions and 32 deletions

View File

@ -40,10 +40,18 @@ func (this *Router) registerAPI() {
apiPrefix + "/v1/account/login",
apiPrefix + "/v1/account/logout",
apiPrefix + "/v1/captcha",
apiPrefix + "/v1/config",
}...)))
v1 := g.Group("/v1")
// Websocket socket接口管理
{
_api := new(api.Websocket)
v1.GET("/ws", _api.Ws)
v1.GET("/pong", _api.Pong)
}
// Captcha 验证码接口管理
v1.GET("/captcha", new(api.Captcha).Captcha)
// Upload 上传接口管理
v1.POST("/upload", new(api.Upload).Upload)
// Account 接口管理
accountV1 := v1.Group("/account")
@ -56,6 +64,8 @@ func (this *Router) registerAPI() {
configV1 := v1.Group("/config")
{
_api := new(api.Config)
configV1.GET("", _api.List)
configV1.POST("/edit", _api.Edit)
configV1.GET("/area", _api.Area)
configV1.POST("/breakdown", _api.Breakdown)
}