|
@@ -3,9 +3,6 @@ import 'dart:io';
|
|
|
import 'package:ftrecruiter/api/api_provider.dart';
|
|
|
import 'package:ftrecruiter/api/http_result.dart';
|
|
|
import 'package:ftrecruiter/comm/constants/api_constants.dart';
|
|
|
-import 'package:ftrecruiter/comm/utils/log_utils.dart';
|
|
|
-import 'package:ftrecruiter/entity/response/UserLogin.dart';
|
|
|
-import 'package:ftrecruiter/entity/response/hotel_login.dart';
|
|
|
import 'package:ftrecruiter/entity/response/industry_data.dart';
|
|
|
import 'package:ftrecruiter/entity/response/server_time.dart';
|
|
|
import 'package:ftrecruiter/entity/response/user_login.dart';
|
|
@@ -165,26 +162,4 @@ class ApiRepository {
|
|
|
}, onError: onError);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- void userLogin({NetSuccessCallback<UserLogin>? success, NetErrorCallback? onError}) {
|
|
|
- Map<String, String> headers = {};
|
|
|
- headers["Accept"] = "application/x.yyjobs-api.v1+json";
|
|
|
-
|
|
|
- Map<String, String> params = {};
|
|
|
- params["nric_no"] = "+8618571458165";
|
|
|
- params["password"] = "12345678";
|
|
|
- params["registration_id"] = "1234";
|
|
|
-
|
|
|
- apiProvider.requestNetwork(ApiConstants.apiUserLogin,
|
|
|
- method: HttpMethod.POST, headers: headers, query: params,
|
|
|
- onSuccess: (json) {
|
|
|
-
|
|
|
- var userLogin = UserLogin.fromJson(json);
|
|
|
- if (success != null) {
|
|
|
- success(userLogin);
|
|
|
- }
|
|
|
-
|
|
|
- }, onError: onError);
|
|
|
- }
|
|
|
-
|
|
|
}
|