Skip to content

Commit

Permalink
Update headers to ensure the API can be accessed
Browse files Browse the repository at this point in the history
  • Loading branch information
MillerAdulu committed Jul 31, 2024
1 parent b5524f2 commit 55315f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/common/repository/auth_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AuthRepository {
assert(!user.isAnonymous, 'User must not be anonymous');
return Future.value(authResult.credential?.accessToken);
} else {
return throw Exception('An error occured');
throw Exception('An error occured');
}
} catch (e) {
log(e.toString(), error: e);
Expand Down
5 changes: 4 additions & 1 deletion lib/common/utils/network.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ class NetworkUtil {
BaseOptions(
baseUrl: '${FlutterConConfig.instance!.values.baseUrl}/v1',
contentType: 'application/json',
headers: <String, dynamic>{'Accept': 'application/json'},
headers: <String, dynamic>{
'Accept': 'application/json',
'Api-Authorization-Key': 'droidconKe-2020',
},
connectTimeout: const Duration(seconds: 60 * 1000),
receiveTimeout: const Duration(seconds: 60 * 1000),
),
Expand Down

0 comments on commit 55315f3

Please sign in to comment.