system.go 528 B

123456789101112131415161718192021222324
  1. package routers
  2. import (
  3. "git.qianqiusoft.com/qianqiusoft/light-apiengine/controllers/gen"
  4. "git.qianqiusoft.com/qianqiusoft/light-apiengine/engine"
  5. )
  6. func init(){
  7. addRegisterHandler(registerSystemRouter)
  8. }
  9. func registerSystemRouter(e *engine.ApiEngine){
  10. api:=e.GinEngine.Group("/api")
  11. system:=api.Group("/v1/system")
  12. ctrler := gen.NewSystemController(e.OrmEngine)
  13. system.GET("/login", ctrler.Login)
  14. system.POST("/login", ctrler.Login)
  15. system.GET("/logout", ctrler.Logout)
  16. system.POST("/logout", ctrler.Logout)
  17. }