Add admin review debug screen
Some checks failed
Build and deploy Flutter Web / build (push) Failing after 14s
Some checks failed
Build and deploy Flutter Web / build (push) Failing after 14s
This commit is contained in:
@@ -51,6 +51,7 @@ class MapflowApi {
|
||||
lastName
|
||||
photoUrl
|
||||
languageCode
|
||||
isAdmin
|
||||
}
|
||||
}
|
||||
''');
|
||||
@@ -73,6 +74,7 @@ class MapflowApi {
|
||||
lastName
|
||||
photoUrl
|
||||
languageCode
|
||||
isAdmin
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,6 +99,7 @@ class MapflowApi {
|
||||
lastName
|
||||
photoUrl
|
||||
languageCode
|
||||
isAdmin
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,12 +140,13 @@ class MapflowApi {
|
||||
telegramId
|
||||
username
|
||||
firstName
|
||||
lastName
|
||||
photoUrl
|
||||
languageCode
|
||||
}
|
||||
lastName
|
||||
photoUrl
|
||||
languageCode
|
||||
isAdmin
|
||||
}
|
||||
}
|
||||
}
|
||||
''',
|
||||
variables: {'token': token},
|
||||
);
|
||||
@@ -255,6 +259,8 @@ class MapflowApi {
|
||||
required LatLng coordinate,
|
||||
required int durationSeconds,
|
||||
required String audioObjectKey,
|
||||
required String audioContentBase64,
|
||||
required String audioMimeType,
|
||||
}) async {
|
||||
if (!hasTelegramAuth) {
|
||||
throw StateError('Telegram authorization is required.');
|
||||
@@ -276,11 +282,43 @@ class MapflowApi {
|
||||
'longitude': coordinate.longitude,
|
||||
'durationSeconds': durationSeconds,
|
||||
'audioObjectKey': audioObjectKey,
|
||||
'audioContentBase64': audioContentBase64,
|
||||
'audioMimeType': audioMimeType,
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<List<VoiceExperienceDebug>> fetchVoiceExperiences() async {
|
||||
final data = await _graphql('''
|
||||
query VoiceExperiences {
|
||||
voiceExperiences {
|
||||
id
|
||||
status
|
||||
durationSeconds
|
||||
transcript
|
||||
analysis
|
||||
createdAt
|
||||
place {
|
||||
name
|
||||
}
|
||||
user {
|
||||
telegramId
|
||||
username
|
||||
firstName
|
||||
}
|
||||
}
|
||||
}
|
||||
''');
|
||||
|
||||
final experiences = data['voiceExperiences'] as List<dynamic>;
|
||||
return experiences
|
||||
.map(
|
||||
(item) => VoiceExperienceDebug.fromJson(item as Map<String, dynamic>),
|
||||
)
|
||||
.toList();
|
||||
}
|
||||
|
||||
Future<Map<String, dynamic>> _graphql(
|
||||
String query, {
|
||||
Map<String, dynamic>? variables,
|
||||
|
||||
Reference in New Issue
Block a user