feat: add IM admin management
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package sys
|
||||
|
||||
import (
|
||||
"context"
|
||||
"hotgo/api/admin/imregistration"
|
||||
"hotgo/internal/service"
|
||||
)
|
||||
|
||||
var ImRegistration = cImRegistration{}
|
||||
|
||||
type cImRegistration struct{}
|
||||
|
||||
func (c *cImRegistration) Get(ctx context.Context, req *imregistration.GetReq) (res *imregistration.GetRes, err error) {
|
||||
data, err := service.SysImRegistration().GetConfig(ctx)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
res = new(imregistration.GetRes)
|
||||
res.ImRegistrationConfigModel = data
|
||||
return
|
||||
}
|
||||
|
||||
func (c *cImRegistration) Update(ctx context.Context, req *imregistration.UpdateReq) (res *imregistration.UpdateRes, err error) {
|
||||
err = service.SysImRegistration().UpdateConfig(ctx, &req.ImRegistrationConfigUpdateInp)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user