GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — Add billing samples (Node 8 ONLY) by ace-n · Pull Request #748 · GoogleCloudPlatform/nodejs-docs-samples Conversation
Contributor
@labtopia FYI
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
fhinkel
reviewed
|
|
|
||
| exports.stopBilling = async (data, context) => { | ||
| const pubsubData = JSON.parse(Buffer.from(data.data, 'base64').toString()); | ||
| if (pubsubData.costAmount <= pubsubData.budgetAmount) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Do we need to assure that costAmount is a number and not a string? Want to avoid cases like '100' < '2' = true
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Probably not - the Billing API itself outputs a number, not a string.
FWIW this is how the code is currently structured.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you add it to the internal CI?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
CI (config) has been added - PTAL? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* chore(main): release 4.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore(main): release 4.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore(main): release 4.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.