organization

pull/218/head
skiffer-git 3 years ago
parent 4a7f406edb
commit b4ab2c69ae

@ -24,6 +24,7 @@ func CreateDepartment(c *gin.Context) {
} }
req := &rpc.CreateDepartmentReq{} req := &rpc.CreateDepartmentReq{}
utils.CopyStructFields(req, &params) utils.CopyStructFields(req, &params)
utils.CopyStructFields(req.DepartmentInfo, &params)
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID) err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
req.OpUserID = opUserID req.OpUserID = opUserID
if err != nil { if err != nil {

@ -3,7 +3,7 @@ package base_info
import open_im_sdk "Open_IM/pkg/proto/sdk_ws" import open_im_sdk "Open_IM/pkg/proto/sdk_ws"
type CreateDepartmentReq struct { type CreateDepartmentReq struct {
open_im_sdk.Department *open_im_sdk.Department
OperationID string `json:"operationID" binding:"required"` OperationID string `json:"operationID" binding:"required"`
} }
type CreateDepartmentResp struct { type CreateDepartmentResp struct {

Loading…
Cancel
Save