Fix multiple production issues and add password change functionality

- Fixed frontend API URL configuration to use correct port 3002
- Fixed create event functionality by adding proper endpoint and fixing JSON parsing
- Fixed email settings save functionality by importing logActivity correctly
- Fixed admin settings save functionality by using api client instead of direct fetch
- Implemented password change functionality with modal and backend endpoint
- Added updated_at column to admin_users table
- Fixed all mock data issues - now using real backend data throughout

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
This commit is contained in:
2025-07-07 10:25:38 +02:00
co-authored by Claude
parent f38a8ef598
commit 225d017718
16 changed files with 495 additions and 82 deletions
+11 -6
View File
@@ -10,10 +10,15 @@ interface CreateEventData {
password: string;
welcome_message?: string;
color_theme?: string;
expires_at: string;
expiration_days: number;
}
interface UpdateEventData {
event_name?: string;
event_date?: string;
host_email?: string;
admin_email?: string;
password?: string;
welcome_message?: string;
color_theme?: string;
expires_at?: string;
@@ -61,13 +66,13 @@ export const eventsService = {
// Update event (admin)
async updateEvent(id: number, data: UpdateEventData): Promise<Event> {
const response = await api.patch<Event>(`/api/admin/events/${id}`, data);
const response = await api.put<Event>(`/api/events/${id}`, data);
return response.data;
},
// Delete/deactivate event (admin)
async deleteEvent(id: number): Promise<void> {
await api.delete(`/api/admin/events/${id}`);
await api.delete(`/api/events/${id}`);
},
// Force archive event (admin)
@@ -76,9 +81,9 @@ export const eventsService = {
},
// Extend event expiration (admin)
async extendExpiration(id: number, newExpiryDate: string): Promise<Event> {
const response = await api.patch<Event>(`/api/admin/events/${id}`, {
expires_at: newExpiryDate,
async extendExpiration(id: number, days: number): Promise<Event> {
const response = await api.post<Event>(`/api/events/${id}/extend`, {
days,
});
return response.data;
},