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

'/packager/update_params' endpoint #31

Merged
merged 6 commits into from
Apr 13, 2018
Merged

'/packager/update_params' endpoint #31

merged 6 commits into from
Apr 13, 2018

Conversation

brew
Copy link
Contributor

@brew brew commented Apr 12, 2018

Update defaultParams property for a package entry managed by os-package-registry (elasticsearch).

  • Check owner of the package is same as user in the jwt
  • Update package model 'defaultParams' property with the passed json in the request body.
  • Clear the os-api cache for the package.

Part of openspending/openspending#1187

Update a package model 'defaultParams' property with the passed request
json. Clears the os-api cache for the package.
Copy link
Contributor

@vitorbaptista vitorbaptista left a comment

Choose a reason for hiding this comment

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

Everything looks good, just missing some tests 👍

except jwt.InvalidTokenError:
return None

_, _, datapackage, _, _, _, _, _ = package_registry.get_raw(name)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you're able to do like _, _, datapackage, *_ = ..., so it's a bit less entangled.

@brew brew merged commit 6310fef into master Apr 13, 2018
@brew brew removed the in progress label Apr 13, 2018
@brew brew deleted the 1187/default-view branch April 17, 2018 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants