Skip to content

Commit

Permalink
neue api struktur
Browse files Browse the repository at this point in the history
  • Loading branch information
Huber1 committed Oct 23, 2024
1 parent e0f2648 commit 89d99af
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/home/meals/service/canteen_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ Future<double?> capacity(Canteen canteen) async {
final mainApi = getIt<MainApi>();
final uri = Uri(
scheme: "https",
host: "beta.api.betterhm.app",
host: "api.betterhm.app",
path: "/v1/capacity/${canteen.enumName}",
);

final response = await mainApi.get(uri, (json) {
try {
double percentage = json["percentage"];
return percentage;
double percentage = json["percent"];
final p = percentage / 100;
return p;
} catch (exception, stacktrace) {
Logger("CapacityService").severe("Parser fail", exception, stacktrace);
rethrow;
Expand Down

0 comments on commit 89d99af

Please sign in to comment.