新增设备模块
This commit is contained in:
17
router/device.go
Normal file
17
router/device.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"go-desk-service/api"
|
||||
"go-desk-service/middleware"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type Device struct{}
|
||||
|
||||
var DeviceApi api.DeviceApi
|
||||
|
||||
func (*Device) Init(app *gin.Engine) {
|
||||
group := app.Group("/device", middleware.TokenAuth())
|
||||
group.POST("/seva", DeviceApi.SevaDeviceInfo)
|
||||
}
|
||||
@@ -5,9 +5,11 @@ import "github.com/gin-gonic/gin"
|
||||
var routerTest Test
|
||||
var websocks Websocks
|
||||
var user User
|
||||
var device Device
|
||||
|
||||
func Init(app *gin.Engine) {
|
||||
routerTest.Init(app)
|
||||
websocks.Init(app)
|
||||
user.Init(app)
|
||||
device.Init(app)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user