From fdfffb897ca6504282976159bdf917bfe1325dae Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 5 Mar 2024 12:41:28 -0500 Subject: [PATCH] fix: if not a manifest, call pinEntity directly --- api/s5/s5.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/s5/s5.go b/api/s5/s5.go index fab0ea5..a86c9ed 100644 --- a/api/s5/s5.go +++ b/api/s5/s5.go @@ -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 + } } }