update to add resume app from sleep
This commit is contained in:
@ -8,14 +8,14 @@ class AuthService{
|
||||
|
||||
static Future<Map<String, dynamic>> changePassword(String oldpassword, String newpassword, String token) async {
|
||||
Map<String, dynamic> changePassword = {};
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/change-password/';
|
||||
print('++++++++${url}');
|
||||
String serverUrl = ConstValues.currentServer();
|
||||
String url = '$serverUrl/api/change-password/';
|
||||
print('++++++++$url');
|
||||
final http.Response response = await http.put(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
'Authorization': 'Token ${token}'
|
||||
'Authorization': 'Token $token'
|
||||
},
|
||||
body: jsonEncode(<String, String>{
|
||||
'old_password': oldpassword,
|
||||
@ -31,11 +31,11 @@ class AuthService{
|
||||
|
||||
|
||||
static Future<Map<String, dynamic>> login(String email, String password) async {
|
||||
print("------- in logged email ${email} pwd ${password} ###### --------");
|
||||
print("------- in logged email $email pwd $password ###### --------");
|
||||
Map<String, dynamic> cats = {};
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/login/';
|
||||
print('++++++++${url}');
|
||||
String serverUrl = ConstValues.currentServer();
|
||||
String url = '$serverUrl/api/login/';
|
||||
print('++++++++$url');
|
||||
//String url = 'http://localhost:8100/api/login/';
|
||||
final http.Response response = await http.post(
|
||||
Uri.parse(url),
|
||||
@ -57,9 +57,9 @@ class AuthService{
|
||||
|
||||
static Future<Map<String, dynamic>> register(String email, String password) async {
|
||||
Map<String, dynamic> cats = {};
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/register/';
|
||||
print('++++++++${url}');
|
||||
String serverUrl = ConstValues.currentServer();
|
||||
String url = '$serverUrl/api/register/';
|
||||
print('++++++++$url');
|
||||
final http.Response response = await http.post(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
@ -79,14 +79,14 @@ class AuthService{
|
||||
|
||||
static Future<Map<String, dynamic>> deleteUser(String token) async {
|
||||
Map<String, dynamic> cats = {};
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/delete-account/';
|
||||
print('++++++++${url}');
|
||||
String serverUrl = ConstValues.currentServer();
|
||||
String url = '$serverUrl/api/delete-account/';
|
||||
print('++++++++$url');
|
||||
final http.Response response = await http.get(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
'Authorization': 'Token ${token}'
|
||||
'Authorization': 'Token $token'
|
||||
}
|
||||
);
|
||||
|
||||
@ -99,10 +99,10 @@ class AuthService{
|
||||
|
||||
static Future<List<dynamic>?> UserDetails(int userid) async {
|
||||
List<dynamic> cats = [];
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/userdetials?user_id=${userid}';
|
||||
print('++++++++${url}');
|
||||
print("---- UserDetails url is ${url}");
|
||||
String serverUrl = ConstValues.currentServer();
|
||||
String url = '$serverUrl/api/userdetials?user_id=$userid';
|
||||
print('++++++++$url');
|
||||
print("---- UserDetails url is $url");
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
|
||||
Reference in New Issue
Block a user