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

Code cleaning: more idiomatic, a bit shorter #1074

Merged
merged 6 commits into from
Nov 26, 2023

Conversation

Caerbannog
Copy link
Contributor

Commits in this PR clean up the code in stages:

  • Convert some promises to async/await in some places where .then() subsisted.
  • Compact arguments for renderOverlay and respondImage (2 lines instead of 12, repeated multiple times)
  • Remove duplicated field names to simplify code
  • Remove unused opt_nokey arg
  • Apply camelCase to function and variable names

Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
});
return res.send(concatenated);
} catch (err) {
res.status(400).header('Content-Type', 'text/plain').send(err);

Check warning

Code scanning / CodeQL

Information exposure through a stack trace Medium

This information exposed to the user depends on
stack trace information
.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not a new problem.
I will fix it in another PR.

@Caerbannog
Copy link
Contributor Author

I think we can ignore the four CodeQL warnings/errors. They are not new and seem OK to me.

@acalcutt acalcutt merged commit 40ade06 into maptiler:master Nov 26, 2023
5 of 6 checks passed
@Caerbannog Caerbannog deleted the refactor4 branch November 26, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants