mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-13 20:53:49 +08:00
1、泛型化参数,预留泛型约束,方便以后代码扩展的类型安全校验
2、升级goframe至v2.7.3
This commit is contained in:
@@ -26,7 +26,7 @@ func init() {
|
||||
|
||||
// UploadFile 上传文件
|
||||
func (s *sCommonUpload) UploadFile(ctx context.Context, uploadType string, file *ghttp.UploadFile) (res *sysin.AttachmentListModel, err error) {
|
||||
attachment, err := storager.DoUpload(ctx, uploadType, file)
|
||||
attachment, err := storager.DoUpload[any](ctx, uploadType, file)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -41,7 +41,7 @@ func (s *sCommonUpload) UploadFile(ctx context.Context, uploadType string, file
|
||||
|
||||
// CheckMultipart 检查文件分片
|
||||
func (s *sCommonUpload) CheckMultipart(ctx context.Context, in *sysin.CheckMultipartInp) (res *sysin.CheckMultipartModel, err error) {
|
||||
data, err := storager.CheckMultipart(ctx, in.CheckMultipartParams)
|
||||
data, err := storager.CheckMultipart[any](ctx, in.CheckMultipartParams)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ func (s *sCommonWechat) Authorize(ctx context.Context, in *commonin.WechatAuthor
|
||||
prefix = g.Cfg().MustGet(ctx, "router.admin.prefix", "/admin").String()
|
||||
path = gmeta.Get(common.WechatAuthorizeCallReq{}, "path").String()
|
||||
redirectUri = basic.Domain + prefix + path
|
||||
memberId = contexts.GetUserId(ctx)
|
||||
memberId = contexts.GetUserId[any](ctx)
|
||||
state = s.GetCacheKey(in.Type, token.GetAuthKey(token.GetAuthorization(request)))
|
||||
scope string
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user