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

feat:query validation added in api-gateway #73

Merged
merged 2 commits into from
Apr 6, 2019

Conversation

manojown
Copy link
Contributor

@manojown manojown commented Apr 5, 2019

resolve #39

Query validation added in Api-gateway.

@@ -195,7 +195,7 @@ class ApiGateway {
initApp(app) {
app.get(`${this.basePath}/v1/load`, this.checkAuthMiddleware, (async (req, res) => {
try {
const query = JSON.parse(req.query.query);
const query = await Joi.validate(JSON.parse(req.query.query),querySchema)
Copy link
Member

Choose a reason for hiding this comment

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

I believe this one is redundant as it called by normalizeQuery?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ya right . Thanks

@paveltiunov
Copy link
Member

@manojown Hey Manoj! Everything looks great except one line. Left a comment there.

@paveltiunov paveltiunov merged commit 21f6176 into cube-js:master Apr 6, 2019
@paveltiunov
Copy link
Member

@manojown 🙌

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.

Validate for empty query object
2 participants