Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
fix the bool
Browse files Browse the repository at this point in the history
  • Loading branch information
Yacine committed May 4, 2023
1 parent 7f68381 commit 6ff5dff
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/src/api/check_queue.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// Import the required libraries
import 'dart:convert';
import 'package:http/http.dart' as http;
import '../data/strings.dart';

Expand Down Expand Up @@ -37,14 +36,11 @@ class CheckQueue {
};

/// Send the GET request to the AI service
final response = await client.get(apiUrl, headers: headers);
final response = await client.head(apiUrl, headers: headers);

if (response.statusCode == 200) {
///Decode the response
final jsonResponse = json.decode(response.body);

/// Return the boolean value indicating whether the queue is ready or not
final success = jsonResponse['success'] as bool;
final bool success = true;

return success;
} else if (response.statusCode != 200) {
Expand Down

0 comments on commit 6ff5dff

Please sign in to comment.