37 lines
982 B
Dart
37 lines
982 B
Dart
// import '../api_service.dart';
|
|
// import 'web_session.dart';
|
|
//
|
|
// class SessionService {
|
|
// final ApiService _api = ApiService();
|
|
//
|
|
// Future<bool> restoreSession() async {
|
|
// final response = await _api.getSession();
|
|
//
|
|
// if (response == null || response['authenticated'] != true) {
|
|
// return false;
|
|
// }
|
|
//
|
|
// final post = response['post'];
|
|
// final pre = response['pre'];
|
|
//
|
|
// // POST
|
|
// WebSession.postClientId = post['client_id'];
|
|
// WebSession.postBranchId = post['branch_id'];
|
|
// WebSession.postHrId = post['hr_id'];
|
|
// WebSession.postModules = post['allowed_modules'];
|
|
//
|
|
// // PRE
|
|
// WebSession.preClientId = pre['client_id'];
|
|
// WebSession.preBranchId = pre['branch_id'];
|
|
// WebSession.preHrId = pre['hr_id'];
|
|
// WebSession.preModules = pre['allowed_modules'];
|
|
//
|
|
// return true;
|
|
// }
|
|
//
|
|
// Future<void> logout() async {
|
|
// await _api.logout();
|
|
// WebSession.clear();
|
|
// }
|
|
// }
|