mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor(mobile): tidy-up dependencies, remove unused, replace rarely used ones (#948)
This commit is contained in:
committed by
GitHub
parent
33ded2a174
commit
8d0ff974e1
@@ -1,16 +0,0 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:immich_mobile/constants/hive_box.dart';
|
||||
|
||||
class AuthenticatedRequestInterceptor extends Interceptor {
|
||||
@override
|
||||
void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
|
||||
// debugPrint('REQUEST[${options.method}] => PATH: ${options.path}');
|
||||
|
||||
var box = Hive.box(userInfoBox);
|
||||
|
||||
options.headers["Authorization"] = "Bearer ${box.get(accessTokenKey)}";
|
||||
options.responseType = ResponseType.plain;
|
||||
return super.onRequest(options, handler);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user