add pin login and add pin code
This commit is contained in:
@@ -4,6 +4,8 @@ import 'dart:io';
|
||||
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:fcs/data/services/services.dart';
|
||||
import 'package:fcs/domain/entities/user.dart';
|
||||
import 'package:fcs/domain/vo/status.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
@@ -28,6 +30,10 @@ Future<dynamic> requestAPI(String path, method,
|
||||
if (token != null) {
|
||||
headers["Token"] = token;
|
||||
}
|
||||
User? pinLoginUser = Services.instance.authService.getPinLoginUser();
|
||||
if (pinLoginUser != null) {
|
||||
headers["pin_token"] = pinLoginUser.pinToken;
|
||||
}
|
||||
if (devInfo.deviceID != null) {
|
||||
headers["Device"] = devInfo.deviceID ?? "" + ":" + deviceName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user