edited the api request
All checks were successful
Build frontend / build (push) Successful in 40s

This commit is contained in:
mouazkh
2026-04-16 22:40:59 +03:00
parent beccd8b24f
commit 7e0d5eaf8d
2 changed files with 119 additions and 6 deletions

View File

@ -383,12 +383,21 @@ export async function confirmDepositPayment(bookingId) {
export async function adminConfirmDeposit(reservationId, adminId, comment = null) {
const token = AuthService.getToken();
const endpoint = `${API_BASE}/Reservations/AdminConfirmDeposit/admin-confirm-deposit`;
const payload = { reservationId, adminId, comment };
const normalizedComment =
typeof comment === 'string' && comment.trim()
? comment.trim()
: null;
const payload = {
reservationId,
adminId,
comment: normalizedComment,
};
console.log('[API] AdminConfirmDeposit request', {
method: 'PUT',
endpoint,
payload,
adminIdSource: 'jwt-user-id',
hasToken: Boolean(token),
tokenPreview: token ? `${token.slice(0, 18)}...${token.slice(-8)}` : null,
});