Skip to content

Commit

Permalink
almost finalize 24.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mrquantumoff committed Jan 13, 2024
1 parent 3e091ac commit ede8915
Show file tree
Hide file tree
Showing 6 changed files with 297 additions and 319 deletions.
6 changes: 2 additions & 4 deletions lib/other/backend.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:convert';
import 'dart:io';
import 'package:dart_ipify/dart_ipify.dart';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:file_picker/file_picker.dart';
import 'package:get/get.dart';
Expand Down Expand Up @@ -527,11 +526,10 @@ void collectUserInfo({bool saveToFile = false}) async {

debugPrint("Current OS: $os");
var res = await http.get(
Uri.parse("https://api.iplocation.net/?ip=${await Ipify.ipv4()}"),
Uri.parse("https://api.myip.com"),
);
debugPrint("IP: ${await Ipify.ipv4()}");
Map responseJSON = json.decode(res.body);
final String country = responseJSON["country_name"] ?? "Unknown";
final String country = responseJSON["country"] ?? "Unknown";
final int modrinthUsage = GetStorage().read("modrinthUsage") ?? 0;
final int curseForgeUsage = GetStorage().read("curseForgeUsage") ?? 0;
final int referenceFileUsage = GetStorage().read("referenceFileUsage") ?? 0;
Expand Down
Loading

0 comments on commit ede8915

Please sign in to comment.