+2
-8
lib/api.dart
+2
-8
lib/api.dart
···
26
26
27
27
Future<Session?> refreshSession(Session session) async {
28
28
final url = Uri.parse('$_apiUrl/api/token/refresh');
29
-
final headers = {
30
-
'Authorization': 'Bearer ${session.token}',
31
-
'Content-Type': 'application/json',
32
-
};
29
+
final headers = {'Content-Type': 'application/json'};
33
30
try {
34
31
final response = await http.post(
35
32
url,
···
51
48
52
49
Future<bool> revokeSession(Session session) async {
53
50
final url = Uri.parse('$_apiUrl/api/token/revoke');
54
-
final headers = {
55
-
'Authorization': 'Bearer ${session.token}',
56
-
'Content-Type': 'application/json',
57
-
};
51
+
final headers = {'Content-Type': 'application/json'};
58
52
try {
59
53
final response = await http.post(
60
54
url,