25-12-1/1
This commit is contained in:
@@ -17,9 +17,6 @@ import 'encrypt_decrypt.dart';
|
||||
import 'upload_image.dart';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:jwt_decoder/jwt_decoder.dart';
|
||||
|
||||
import 'network/connection_check.dart';
|
||||
import 'network/net_guard.dart';
|
||||
|
||||
class CRUD {
|
||||
@@ -364,29 +361,29 @@ class CRUD {
|
||||
}
|
||||
}
|
||||
|
||||
Future<dynamic> getTokenParent({
|
||||
required String link,
|
||||
Map<String, dynamic>? payload,
|
||||
}) async {
|
||||
// Uses Basic Auth, so it's a separate implementation.
|
||||
var url = Uri.parse(
|
||||
link,
|
||||
);
|
||||
var response = await http.post(
|
||||
url,
|
||||
body: payload,
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
'Authorization':
|
||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
||||
},
|
||||
);
|
||||
if (response.statusCode == 200) {
|
||||
return jsonDecode(response.body);
|
||||
}
|
||||
// Consider adding error handling here.
|
||||
return null;
|
||||
}
|
||||
// Future<dynamic> getTokenParent({
|
||||
// required String link,
|
||||
// Map<String, dynamic>? payload,
|
||||
// }) async {
|
||||
// // Uses Basic Auth, so it's a separate implementation.
|
||||
// var url = Uri.parse(
|
||||
// link,
|
||||
// );
|
||||
// var response = await http.post(
|
||||
// url,
|
||||
// body: payload,
|
||||
// headers: {
|
||||
// "Content-Type": "application/x-www-form-urlencoded",
|
||||
// 'Authorization':
|
||||
// 'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
||||
// },
|
||||
// );
|
||||
// if (response.statusCode == 200) {
|
||||
// return jsonDecode(response.body);
|
||||
// }
|
||||
// // Consider adding error handling here.
|
||||
// return null;
|
||||
// }
|
||||
|
||||
Future sendWhatsAppAuth(String to, String token) async {
|
||||
var res = await CRUD()
|
||||
|
||||
Reference in New Issue
Block a user