feat: live module and jenkins pipeline to harbor deploy
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"kra/internal/service/dto"
|
||||
service "kra/internal/service/platformsetting"
|
||||
)
|
||||
|
||||
type PlatformSetting struct{ s *service.Service }
|
||||
|
||||
func NewPlatformSetting(s *service.Service) *PlatformSetting { return &PlatformSetting{s: s} }
|
||||
func (h *PlatformSetting) Get(c *gin.Context) {
|
||||
v, e := h.s.Get(c.Request.Context())
|
||||
if e != nil {
|
||||
businessFail(c, e)
|
||||
return
|
||||
}
|
||||
OKWithData(c, v)
|
||||
}
|
||||
func (h *PlatformSetting) Save(c *gin.Context) {
|
||||
in, ok := bindJSON[dto.PlatformSetting](c)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
if e := h.s.Save(c.Request.Context(), in); e != nil {
|
||||
businessFail(c, e)
|
||||
return
|
||||
}
|
||||
OK(c)
|
||||
}
|
||||
Reference in New Issue
Block a user