Skip to content

Commit eb89b63

Browse files
Brazolkanat
andauthored
added pronto-staging env to dogfooding (#698)
* [PBE-1710] make example app Firebase friendly * [PBE-1710] support reject.reason & show notification * fix ios, improve setup * support pronto-staging * write openapi script + generate new API * added pronto-staging env to dogfooding --------- Co-authored-by: kanat <[email protected]>
1 parent 0ac16a1 commit eb89b63

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

dogfooding/lib/core/repos/token_service.dart

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,36 @@ import 'package:http/http.dart' as http;
77
enum Environment {
88
pronto(
99
'Pronto',
10+
'pronto',
11+
'pronto.getstream.io',
1012
aliases: ['stream-calls-dogfood'],
1113
),
14+
prontoStaging(
15+
'Pronto Staging',
16+
'pronto',
17+
'pronto-staging.getstream.io',
18+
),
1219
demo(
1320
'Demo',
21+
'demo',
22+
'demo.getstream.io',
1423
aliases: [''],
1524
),
1625
staging(
1726
'Staging',
27+
'staging',
28+
'pronto.getstream.io',
1829
);
1930

2031
final String displayName;
32+
final String envName;
33+
final String hostName;
2134
final List<String> aliases;
2235

2336
const Environment(
24-
this.displayName, {
37+
this.displayName,
38+
this.envName,
39+
this.hostName, {
2540
this.aliases = const [],
2641
});
2742

@@ -59,7 +74,7 @@ class TokenService {
5974
Duration? expiresIn,
6075
}) async {
6176
final queryParameters = <String, dynamic>{
62-
'environment': environment.name,
77+
'environment': environment.envName,
6378
'user_id': userId,
6479
};
6580

@@ -69,7 +84,7 @@ class TokenService {
6984

7085
final uri = Uri(
7186
scheme: 'https',
72-
host: 'pronto.getstream.io',
87+
host: environment.hostName,
7388
path: '/api/auth/create-token',
7489
queryParameters: queryParameters,
7590
);

dogfooding/lib/widgets/environment_switcher.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ class _EnvironmentSwitcherState extends State<EnvironmentSwitcher> {
109109
child: Center(
110110
child: Text(
111111
env.displayName,
112+
textAlign: TextAlign.center,
112113
style: TextStyle(
113-
color: selectedEnvironment == env
114-
? AppColorPalette.appGreen
115-
: Colors.white),
114+
color: selectedEnvironment == env
115+
? AppColorPalette.appGreen
116+
: Colors.white,
117+
),
116118
),
117119
),
118120
),

0 commit comments

Comments
 (0)