attachment.go 534 B

12345678910111213141516171819202122
  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(registerSysAttachmentRouter)
  8. }
  9. func registerSysAttachmentRouter(e *engine.ApiEngine){
  10. api:=e.GinEngine.Group("/api")
  11. system:=api.Group("/v1/system")
  12. ctrler := gen.NewSysAttachmentController(e.OrmEngine)
  13. system.POST("/upload", ctrler.Upload)
  14. system.GET("/download/:attrId", ctrler.Download)
  15. system.GET("/delete/:attrId", ctrler.Delete)
  16. }