refactor: if the user has the file pinned and no import exists, assume a completed status

This commit is contained in:
Derrick Hammer 2024-03-22 18:30:02 -04:00
parent 7665937196
commit 5b2a86275f
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 1 deletions

View File

@ -1166,7 +1166,10 @@ func (s *S5API) accountPinStatus(jc jape.Context) {
meta, err := s._import.GetImport(jc.Request.Context(), decodedCid.Hash.HashBytes())
if err != nil {
s.sendErrorResponse(jc, NewS5Error(ErrKeyResourceNotFound, err))
jc.Encode(&AccountPinStatusResponse{
Status: models.ImportStatusCompleted,
Progress: 100,
})
return
}