added user delete feture
This commit is contained in:
@ -77,6 +77,25 @@ class AuthService{
|
||||
return cats;
|
||||
}
|
||||
|
||||
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/';
|
||||
//String url = 'http://localhost:8100/api/register/';
|
||||
final http.Response response = await http.get(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
'Authorization': 'Token ${token}'
|
||||
}
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
cats = json.decode(utf8.decode(response.bodyBytes));
|
||||
}
|
||||
return cats;
|
||||
}
|
||||
|
||||
|
||||
static Future<List<dynamic>?> UserDetails(int userid) async {
|
||||
List<dynamic> cats = [];
|
||||
|
||||
Reference in New Issue
Block a user