forked from firka/student-legacy
add test school
This commit is contained in:
parent
b509adcbc9
commit
25100ab7d9
@ -20,7 +20,13 @@ class FilcAPI {
|
|||||||
http.Response res = await http.get(Uri.parse(SCHOOL_LIST));
|
http.Response res = await http.get(Uri.parse(SCHOOL_LIST));
|
||||||
|
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
return (jsonDecode(res.body) as List).cast<Map>().map((json) => School.fromJson(json)).toList();
|
List<School> schools = (jsonDecode(res.body) as List).cast<Map>().map((json) => School.fromJson(json)).toList();
|
||||||
|
schools.add(School(
|
||||||
|
city: "Tiszabura",
|
||||||
|
instituteCode: "supporttest-reni-tiszabura-teszt01",
|
||||||
|
name: "FILC Éles Reni tiszabura-teszt",
|
||||||
|
));
|
||||||
|
return schools;
|
||||||
} else {
|
} else {
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
throw "HTTP ${res.statusCode}: ${res.body}";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user