Skip to content

Commit

Permalink
Update submodule and fix Dart template
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis-Averin committed Jul 18, 2023
1 parent 7f0627a commit ecf51eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions codegen/Templates/dart/auth/oauth.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ class OAuth implements Authentication {
..fields['client_secret'] = clientSecret;
final response = await request.send();
final response_text = await response.stream.bytesToString();
final responseText = await response.stream.bytesToString();
if (response.statusCode != 200) {
throw ApiException(response.statusCode, response_text);
throw ApiException(response.statusCode, responseText);
}

final data = jsonDecode(response_text);
final int expires_in = data['expires_in'];
final data = jsonDecode(responseText);
final int expiresIn = data['expires_in'];

accessToken = data['access_token'];
tokenExpiration = DateTime.now().add(Duration(seconds: expires_in));
tokenExpiration = DateTime.now().add(Duration(seconds: expiresIn));
}
}
2 changes: 1 addition & 1 deletion submodules/dotnet

0 comments on commit ecf51eb

Please sign in to comment.