Add human-readable event URL slugs with legacy redirect support.

Store unique slugs on events, backfill existing records, redirect old UUID and alias URLs to canonical slug pages, and expose slug editing plus alias management in the admin event modal.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Michilis
2026-06-05 04:09:05 +00:00
co-authored by Cursor
parent d09c87a5a5
commit 1b2463f4bc
15 changed files with 361 additions and 33 deletions
+7
View File
@@ -67,6 +67,12 @@ export const eventsApi = {
duplicate: (id: string) =>
fetchApi<{ event: Event; message: string }>(`/api/events/${id}/duplicate`, { method: 'POST' }),
getSlugAliases: (id: string) =>
fetchApi<{ aliases: { slug: string; createdAt: string }[] }>(`/api/events/${id}/slug-aliases`),
deleteSlugAlias: (id: string, slug: string) =>
fetchApi<{ message: string }>(`/api/events/${id}/slug-aliases/${encodeURIComponent(slug)}`, { method: 'DELETE' }),
};
// Tickets API
@@ -525,6 +531,7 @@ export const emailsApi = {
// Types
export interface Event {
id: string;
slug: string;
title: string;
titleEs?: string;
description: string;