Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spanner/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ function readWriteTransaction (instanceId, databaseId) {
console.log(`The second album's marketing budget: ${secondBudget}`);

// Makes sure the second album's budget is sufficient
if (secondBudget < transferAmount) {
throw new Error(`The second album's budget (${secondBudget}) is less than the transfer amount (${transferAmount}).`);
if (secondBudget < 300000) {
throw new Error(`The second album's budget (${secondBudget}) is less than the minimum required amount of $300,000.`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: can we make the 300000 a constant, and put its declaration next to transferAmount?

(I prefer having constants defined in one place if possible rather than repeating literal values.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}
}),

Expand Down