fixed gps page
This commit is contained in:
@ -302,6 +302,44 @@ class ExternalService {
|
||||
return res2;
|
||||
}
|
||||
|
||||
Future<bool> removeCheckin(int cp) async {
|
||||
final IndexController indexController = Get.find<IndexController>();
|
||||
|
||||
//int userId = indexController.currentUser[0]["user"]["id"];
|
||||
//print("--- Pressed -----");
|
||||
String team = indexController.currentUser[0]["user"]['team_name'];
|
||||
//print("--- _team : ${_team}-----");
|
||||
String eventCode = indexController.currentUser[0]["user"]["event_code"];
|
||||
|
||||
if (indexController.connectionStatusName.value != "wifi" &&
|
||||
indexController.connectionStatusName.value != "mobile") {
|
||||
return Future.value(false);
|
||||
} else {
|
||||
String url =
|
||||
'https://rogaining.sumasen.net/gifuroge/remove_checkin_from_rogapp';
|
||||
//print('++++++++$url');
|
||||
final http.Response response = await http.post(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
},
|
||||
body: jsonEncode(<String, String>{
|
||||
'event_code': eventCode,
|
||||
'team_name': team,
|
||||
'cp_number': cp.toString()
|
||||
}),
|
||||
);
|
||||
|
||||
//print("---- remove checkin ---- ${response.statusCode}");
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return Future.value(true);
|
||||
//print('----_res : $res ----');
|
||||
}
|
||||
}
|
||||
return Future.value(false);
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> usersEventCode(
|
||||
String teamcode, String password) async {
|
||||
Map<String, dynamic> res = {};
|
||||
|
||||
Reference in New Issue
Block a user