fix: if not a manifest, call pinEntity directly

This commit is contained in:
Derrick Hammer 2024-03-05 12:41:28 -05:00
parent a5c1356847
commit fdfffb897c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 0 deletions

View File

@ -1027,6 +1027,12 @@ func (s *S5API) accountPin(jc jape.Context) {
if isCidManifest(decodedCid) {
s.accountPinManifest(jc, userID, decodedCid)
return
} else {
err = s.pinEntity(jc.Request.Context(), userID, decodedCid)
if err != nil {
s.sendErrorResponse(jc, NewS5Error(ErrKeyStorageOperationFailed, err))
return
}
}
}