This commit is contained in:
withchao 2023-03-29 18:41:30 +08:00
parent c7f7e7c782
commit 12b19bdf64
2 changed files with 4 additions and 2 deletions

View File

@ -29,8 +29,7 @@ func (t *thirdServer) GetUrl(ctx context.Context, req *third.GetUrlReq) (*third.
}
func (t *thirdServer) GetHashInfo(ctx context.Context, req *third.GetHashInfoReq) (*third.GetHashInfoResp, error) {
return nil, nil
return t.s3dataBase.GetHashInfo(ctx, req)
}
func (t *thirdServer) CleanObject(ctx context.Context, now time.Time) {

View File

@ -463,6 +463,9 @@ func (c *s3Database) clearNoCitation(ctx context.Context, engine string, limit i
}
func (c *s3Database) GetHashInfo(ctx context.Context, req *third.GetHashInfoReq) (*third.GetHashInfoResp, error) {
if err := c.CheckHash(req.Hash); err != nil {
return nil, err
}
o, err := c.hash.Take(ctx, req.Hash, c.obj.Name())
if err != nil {
return nil, err