Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
nitro-neal committed Jan 13, 2023
1 parent 4a05403 commit c03d99b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 4 additions & 2 deletions pkg/service/credential/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ func (s Service) CreateCredential(ctx context.Context, request CreateCredentialR
}
writeContexts = append(writeContexts, *credWriteContext)

s.storage.WriteMany(ctx, writeContexts)
if err = s.storage.WriteMany(ctx, writeContexts); err != nil {
return nil, util.LoggingErrorMsg(err, "failed to save vc")
}

response := CreateCredentialResponse{Container: container}
return &response, nil
Expand Down Expand Up @@ -289,7 +291,7 @@ func getStatusListCredential(ctx context.Context, s Service, issuerID string, sc
if err = s.storage.StoreStatusListCredential(ctx, storageRequest); err != nil {
return nil, util.LoggingErrorMsg(err, "could not store credential")
}

statusListCredential = generatedStatusListCredential

} else {
Expand Down
2 changes: 0 additions & 2 deletions pkg/service/manifest/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ func (ms *Storage) DeleteResponse(ctx context.Context, id string) error {
// creates in step 2.
//
// The operation and it's response (from 3) are returned.

func (ms *Storage) ReviewApplication(ctx context.Context, applicationID string, approved bool, reason string, opID string, response StoredResponse) (*StoredResponse, *opstorage.StoredOperation, error) {
// TODO: everything should be in a single Tx.
m := map[string]any{
Expand All @@ -257,7 +256,6 @@ func (ms *Storage) ReviewApplication(ctx context.Context, applicationID string,
if approved {
m["status"] = opsubmission.StatusApproved
}

if _, err := ms.db.Update(ctx, credential.ApplicationNamespace, applicationID, m); err != nil {
return nil, nil, errors.Wrap(err, "updating application")
}
Expand Down

0 comments on commit c03d99b

Please sign in to comment.