Die Dateien wurden in mehreren Log- und Cache-Ordnern geändert:
This commit is contained in:
2
backend/static/css/tailwind.min.css
vendored
2
backend/static/css/tailwind.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -93,7 +93,7 @@ async function loadGuestRequests() {
|
||||
try {
|
||||
showLoading(true);
|
||||
|
||||
const url = `${API_BASE_URL}/api/admin/requests`;
|
||||
const url = `${API_BASE_URL}/api/admin/guest-requests`;
|
||||
const response = await fetch(url, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
@@ -429,7 +429,7 @@ async function approveRequest(requestId) {
|
||||
try {
|
||||
showLoading(true);
|
||||
|
||||
const url = `${API_BASE_URL}/api/requests/${requestId}/approve`;
|
||||
const url = `${API_BASE_URL}/api/admin/guest-requests/${requestId}/approve`;
|
||||
const response = await fetch(url, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -437,7 +437,7 @@ async function approveRequest(requestId) {
|
||||
'X-CSRFToken': csrfToken
|
||||
},
|
||||
body: JSON.stringify({
|
||||
notes: notes || ''
|
||||
approval_notes: notes || ''
|
||||
})
|
||||
});
|
||||
|
||||
@@ -445,12 +445,12 @@ async function approveRequest(requestId) {
|
||||
|
||||
if (data.success) {
|
||||
showNotification('✅ Gastauftrag erfolgreich genehmigt', 'success');
|
||||
if (data.otp) {
|
||||
showNotification(`🔑 OTP-Code für Gast: ${data.otp}`, 'info');
|
||||
if (data.otp_code) {
|
||||
showNotification(`🔑 OTP-Code für ${data.guest_name}: ${data.otp_code}`, 'info');
|
||||
}
|
||||
loadGuestRequests();
|
||||
} else {
|
||||
throw new Error(data.message || 'Fehler beim Genehmigen');
|
||||
throw new Error(data.error || 'Fehler beim Genehmigen');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Fehler beim Genehmigen:', error);
|
||||
@@ -470,14 +470,14 @@ async function rejectRequest(requestId) {
|
||||
try {
|
||||
showLoading(true);
|
||||
|
||||
const url = `${API_BASE_URL}/api/requests/${requestId}/deny`;
|
||||
const url = `${API_BASE_URL}/api/admin/guest-requests/${requestId}/reject`;
|
||||
const response = await fetch(url, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfToken
|
||||
},
|
||||
body: JSON.stringify({ reason: reason.trim() })
|
||||
body: JSON.stringify({ rejection_reason: reason.trim() })
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
@@ -486,7 +486,7 @@ async function rejectRequest(requestId) {
|
||||
showNotification('✅ Gastauftrag erfolgreich abgelehnt', 'success');
|
||||
loadGuestRequests();
|
||||
} else {
|
||||
throw new Error(data.message || 'Fehler beim Ablehnen');
|
||||
throw new Error(data.error || 'Fehler beim Ablehnen');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Fehler beim Ablehnen:', error);
|
||||
|
Reference in New Issue
Block a user