@blackcode_sa/metaestetics-api 1.5.36 → 1.5.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -11794,6 +11794,15 @@ var AppointmentService = class extends BaseService {
|
|
|
11794
11794
|
if (endDate <= startDate) {
|
|
11795
11795
|
throw new Error("End date must be after start date");
|
|
11796
11796
|
}
|
|
11797
|
+
const currentUser = this.auth.currentUser;
|
|
11798
|
+
if (!currentUser) {
|
|
11799
|
+
throw new Error(
|
|
11800
|
+
"User must be authenticated to get available booking slots"
|
|
11801
|
+
);
|
|
11802
|
+
}
|
|
11803
|
+
console.log(
|
|
11804
|
+
`[APPOINTMENT_SERVICE] Authenticated user ID: ${currentUser.uid}. Preparing to call getAvailableBookingSlots function.`
|
|
11805
|
+
);
|
|
11797
11806
|
const getAvailableBookingSlotsFunction = (0, import_functions.httpsCallable)(
|
|
11798
11807
|
this.functions,
|
|
11799
11808
|
"getAvailableBookingSlots"
|
package/dist/index.mjs
CHANGED
|
@@ -11883,6 +11883,15 @@ var AppointmentService = class extends BaseService {
|
|
|
11883
11883
|
if (endDate <= startDate) {
|
|
11884
11884
|
throw new Error("End date must be after start date");
|
|
11885
11885
|
}
|
|
11886
|
+
const currentUser = this.auth.currentUser;
|
|
11887
|
+
if (!currentUser) {
|
|
11888
|
+
throw new Error(
|
|
11889
|
+
"User must be authenticated to get available booking slots"
|
|
11890
|
+
);
|
|
11891
|
+
}
|
|
11892
|
+
console.log(
|
|
11893
|
+
`[APPOINTMENT_SERVICE] Authenticated user ID: ${currentUser.uid}. Preparing to call getAvailableBookingSlots function.`
|
|
11894
|
+
);
|
|
11886
11895
|
const getAvailableBookingSlotsFunction = httpsCallable(
|
|
11887
11896
|
this.functions,
|
|
11888
11897
|
"getAvailableBookingSlots"
|
package/package.json
CHANGED
|
@@ -123,6 +123,19 @@ export class AppointmentService extends BaseService {
|
|
|
123
123
|
throw new Error("End date must be after start date");
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
// Check if user is authenticated
|
|
127
|
+
const currentUser = this.auth.currentUser;
|
|
128
|
+
if (!currentUser) {
|
|
129
|
+
throw new Error(
|
|
130
|
+
"User must be authenticated to get available booking slots"
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Log the authenticated user ID before making the call
|
|
135
|
+
console.log(
|
|
136
|
+
`[APPOINTMENT_SERVICE] Authenticated user ID: ${currentUser.uid}. Preparing to call getAvailableBookingSlots function.`
|
|
137
|
+
);
|
|
138
|
+
|
|
126
139
|
// Create a callable function reference
|
|
127
140
|
const getAvailableBookingSlotsFunction = httpsCallable(
|
|
128
141
|
this.functions,
|