Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ Tuyển Vũ Xuân <[email protected]>
Sarthak Verma <[email protected]>
Mike Diarmid <[email protected]>
Invertase <[email protected]>
Rishab Nayak <[email protected]>
2 changes: 1 addition & 1 deletion packages/cloud_functions/lib/cloud_functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CloudFunctionsException implements Exception {
class CloudFunctions {
CloudFunctions({FirebaseApp app, String region})
: _app = app ?? FirebaseApp.instance,
_region = region;
_region = region ?? "us-central1";
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like defaulting to a certain value behind the scene might be hard to debug for users that does not enable the "us-central1" region in their application. Do google cloud always enable "us-central1"?
Maybe `assert (region != null) is better.
@collinjackson

Copy link
Contributor Author

@rishabnayak rishabnayak Mar 1, 2019

Choose a reason for hiding this comment

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

I agree, but apparently the Cloud Functions docs say that they run in the us-central1 region by default. Here's the link


@visibleForTesting
static const MethodChannel channel = MethodChannel('cloud_functions');
Expand Down
2 changes: 1 addition & 1 deletion packages/cloud_functions/test/cloud_functions_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void main() {
'CloudFunctions#call',
arguments: <String, dynamic>{
'app': '[DEFAULT]',
'region': null,
'region': 'us-central1',
'functionName': 'baz',
'parameters': null,
},
Expand Down