Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: db client improvements #546

Merged
merged 3 commits into from
Oct 20, 2021

Conversation

vasco-santos
Copy link
Contributor

@vasco-santos vasco-santos commented Oct 20, 2021

The main goal of this PR is to address review comments from: #524 (review)

It contains:

  • rename InvalidCidError
  • consistent params for renameUpload and deleteUpload
  • token fix for Postgres client
  • sourceCid + contentCid inconsistencies
  • protection for attempting to delete already deleted upload/autk_key
  • performance enhancement for listKeys by having a stored procedure with a count instead of returning all upload IDs
  • improve getKey function

@vasco-santos vasco-santos marked this pull request as ready for review October 20, 2021 10:11
packages/api/src/status.js Outdated Show resolved Hide resolved
packages/api/src/status.js Outdated Show resolved Hide resolved
packages/api/src/utils/parse-cid.js Outdated Show resolved Hide resolved
*
* @param {string} cid
*/
export function parseCid (cid) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider renaming this normalizeCid?

@vasco-santos vasco-santos merged commit 706dada into chore/db-migration Oct 20, 2021
@vasco-santos vasco-santos deleted the chore/db-client-improvements branch October 20, 2021 13:59
vasco-santos added a commit that referenced this pull request Oct 22, 2021
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
@vasco-santos vasco-santos mentioned this pull request Oct 22, 2021
vasco-santos added a commit that referenced this pull request Oct 22, 2021
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
vasco-santos added a commit that referenced this pull request Oct 22, 2021
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants