mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-12 21:16:00 +08:00
solve error
This commit is contained in:
@@ -28,7 +28,7 @@ func (o *Auth) client() (auth.AuthClient, error) {
|
||||
}
|
||||
|
||||
func (o *Auth) UserRegister(c *gin.Context) {
|
||||
a2r.Call(auth.AuthClient.UserRegister, o.client, c)
|
||||
//a2r.Call(auth.AuthClient.UserRegister, o.client, c) // todo
|
||||
}
|
||||
|
||||
func (o *Auth) UserToken(c *gin.Context) {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
package manage
|
||||
|
||||
import (
|
||||
"OpenIM/internal/apiresp"
|
||||
api "OpenIM/pkg/apistruct"
|
||||
"OpenIM/pkg/common/config"
|
||||
"OpenIM/pkg/common/constant"
|
||||
@@ -16,6 +17,7 @@ import (
|
||||
sdkws "OpenIM/pkg/proto/sdkws"
|
||||
"OpenIM/pkg/utils"
|
||||
"context"
|
||||
"errors"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@@ -122,6 +124,10 @@ func init() {
|
||||
// @Failure 400 {object} api.ManagementSendMsgResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||
// @Router /msg/manage_send_msg [post]
|
||||
func ManagementSendMsg(c *gin.Context) {
|
||||
|
||||
apiresp.GinError(c, errors.New("todo"))
|
||||
apiresp.GinSuccess(c, nil)
|
||||
|
||||
var data interface{}
|
||||
params := api.ManagementSendMsgReq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package apiresp
|
||||
|
||||
type ApiResponse struct {
|
||||
type apiResponse struct {
|
||||
ErrCode int `json:"errCode"`
|
||||
ErrMsg string `json:"errMsg"`
|
||||
ErrDlt string `json:"errDlt"`
|
||||
Data any `json:"data"`
|
||||
}
|
||||
|
||||
func apiSuccess(data any) *ApiResponse {
|
||||
return &ApiResponse{
|
||||
func apiSuccess(data any) *apiResponse {
|
||||
return &apiResponse{
|
||||
Data: data,
|
||||
}
|
||||
}
|
||||
|
||||
func apiError(err error) *ApiResponse {
|
||||
return &ApiResponse{ErrCode: 10000, ErrMsg: err.Error()}
|
||||
func apiError(err error) *apiResponse {
|
||||
return &apiResponse{ErrCode: 10000, ErrMsg: err.Error()}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import (
|
||||
pbfriend "OpenIM/pkg/proto/friend"
|
||||
"OpenIM/pkg/utils"
|
||||
"context"
|
||||
"github.com/OpenIMSDK/openKeeper"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"OpenIM/pkg/common/db/controller"
|
||||
"OpenIM/pkg/common/db/relation"
|
||||
relationTb "OpenIM/pkg/common/db/table/relation"
|
||||
"OpenIM/pkg/common/db/tx"
|
||||
"OpenIM/pkg/common/db/unrelation"
|
||||
"OpenIM/pkg/common/tokenverify"
|
||||
"OpenIM/pkg/common/tracelog"
|
||||
@@ -19,7 +18,6 @@ import (
|
||||
"OpenIM/pkg/utils"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/dtm-labs/rockscache"
|
||||
"google.golang.org/grpc"
|
||||
"gorm.io/gorm"
|
||||
"math/big"
|
||||
|
||||
Reference in New Issue
Block a user