Complete Telegram bot login from callback URL
All checks were successful
Build and deploy Flutter Web / build (push) Successful in 2m18s
All checks were successful
Build and deploy Flutter Web / build (push) Successful in 2m18s
This commit is contained in:
@@ -126,14 +126,11 @@ class MapflowApi {
|
||||
);
|
||||
}
|
||||
|
||||
Future<TelegramBotLoginStatus> fetchTelegramBotLoginStatus(
|
||||
String token,
|
||||
) async {
|
||||
Future<TelegramBotLoginSession> completeTelegramBotLogin(String token) async {
|
||||
final data = await _graphql(
|
||||
'''
|
||||
query TelegramBotLoginStatus(\$token: String!) {
|
||||
telegramBotLoginStatus(token: \$token) {
|
||||
status
|
||||
mutation CompleteTelegramBotLogin(\$token: String!) {
|
||||
completeTelegramBotLogin(token: \$token) {
|
||||
sessionToken
|
||||
user {
|
||||
id
|
||||
@@ -149,8 +146,8 @@ class MapflowApi {
|
||||
''',
|
||||
variables: {'token': token},
|
||||
);
|
||||
return TelegramBotLoginStatus.fromJson(
|
||||
data['telegramBotLoginStatus'] as Map<String, dynamic>,
|
||||
return TelegramBotLoginSession.fromJson(
|
||||
data['completeTelegramBotLogin'] as Map<String, dynamic>,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user