This commit is contained in:
withchao 2023-03-28 16:26:02 +08:00
parent e27be8f698
commit 3613787a6b
2 changed files with 5 additions and 5 deletions

View File

@ -110,7 +110,7 @@ func NewGinRouter(zk discoveryregistry.SvcDiscoveryRegistry, rdb redis.Universal
authRouterGroupChildToken.POST("/force_logout", a.ForceLogout) //1
}
////Third service
thirdGroup := r.Group("/third")
thirdGroup := r.Group("/responseresponse")
{
t := NewThird(zk)
thirdGroup.Use(mw.GinParseToken(rdb))

View File

@ -259,7 +259,7 @@ func (c *s3Database) ConfirmPut(ctx context.Context, req *third.ConfirmPutReq) (
return &third.ConfirmPutResp{
Url: c.urlName(o.Name),
}, nil
} else if c.isNotFound(err) {
} else if !c.isNotFound(err) {
return nil, err
}
src := make([]obj.BucketObject, pack)
@ -342,15 +342,15 @@ func (c *s3Database) ConfirmPut(ctx context.Context, req *third.ConfirmPutReq) (
Name: dst.Name,
CreateTime: time.Now(),
}
if err := c.hash.Create(ctx, []*relation.ObjectHashModel{h}); err != nil {
return nil, err
}
o := &relation.ObjectInfoModel{
Name: put.Name,
Hash: put.Hash,
ExpirationTime: put.ExpirationTime,
CreateTime: time.Now(),
}
if err := c.hash.Create(ctx, []*relation.ObjectHashModel{h}); err != nil {
return nil, err
}
if err := c.info.SetObject(ctx, o); err != nil {
return nil, err
}