update
This commit is contained in:
@ -6,7 +6,7 @@ class PerfectureService{
|
||||
|
||||
static Future<List<dynamic>?> loadPerfectures() async {
|
||||
List<dynamic> perfs = [];
|
||||
String url = 'http://localhost:8100/api/perf/';
|
||||
String url = 'http://localhost:8100/api/perf_main/';
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
@ -15,10 +15,27 @@ class PerfectureService{
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
|
||||
perfs = json.decode(response.body);
|
||||
perfs = json.decode(utf8.decode(response.bodyBytes));
|
||||
}
|
||||
return perfs;
|
||||
}
|
||||
|
||||
static Future<List<dynamic>?> loadSubPerfectures(String sub) async {
|
||||
List<dynamic> perfs = [];
|
||||
String url = 'http://localhost:8100/api/insubperf/?perf=' + sub;
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
|
||||
perfs = json.decode(utf8.decode(response.bodyBytes));
|
||||
}
|
||||
return perfs;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user