|
|
|
@ -1,5 +1,4 @@
|
|
|
|
|
|
|
|
// import 'package:cloud_firestore/cloud_firestore.dart';
|
|
|
|
import 'package:cloud_firestore/cloud_firestore.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> monitoredEndpoints = [
|
|
|
|
List<String> monitoredEndpoints = [
|
|
|
|
"Services/Sentry.svc/REST/MemberLogIN_New",
|
|
|
|
"Services/Sentry.svc/REST/MemberLogIN_New",
|
|
|
|
@ -37,7 +36,6 @@ void postFailureResponse({
|
|
|
|
// await collectionRef.doc(DateTime.now().toIso8601String()).set(data);
|
|
|
|
// await collectionRef.doc(DateTime.now().toIso8601String()).set(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void postRequestAndResponse({
|
|
|
|
void postRequestAndResponse({
|
|
|
|
required dynamic doctorId,
|
|
|
|
required dynamic doctorId,
|
|
|
|
required String completeUrl,
|
|
|
|
required String completeUrl,
|
|
|
|
@ -56,11 +54,11 @@ void postRequestAndResponse({
|
|
|
|
"response": response,
|
|
|
|
"response": response,
|
|
|
|
"statusCode": statusCode,
|
|
|
|
"statusCode": statusCode,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
final firestore = FirebaseFirestore.instance;
|
|
|
|
// final firestore = FirebaseFirestore.instance;
|
|
|
|
// Sanitize urlSuffix to be Firestore-safe
|
|
|
|
// Sanitize urlSuffix to be Firestore-safe
|
|
|
|
final safeSuffix = urlSuffix.replaceAll(RegExp(r'[^a-zA-Z0-9_-]'), '_');
|
|
|
|
final safeSuffix = urlSuffix.replaceAll(RegExp(r'[^a-zA-Z0-9_-]'), '_');
|
|
|
|
final collectionRef = firestore.collection('doctors')
|
|
|
|
// final collectionRef = firestore.collection('doctors')
|
|
|
|
.doc(doctorId.toString())
|
|
|
|
// .doc(doctorId.toString())
|
|
|
|
.collection(safeSuffix);
|
|
|
|
// .collection(safeSuffix);
|
|
|
|
await collectionRef.doc(DateTime.now().toIso8601String()).set(data);
|
|
|
|
// await collectionRef.doc(DateTime.now().toIso8601String()).set(data);
|
|
|
|
}
|
|
|
|
}
|