mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-28 14:18:04 -05:00
When deleting tournament, also delete cache Closes #1800
This commit is contained in:
@@ -24,6 +24,7 @@ import { useUser } from "~/features/auth/core/user";
|
||||
import { requireUserId } from "~/features/auth/core/user.server";
|
||||
import * as CalendarRepository from "~/features/calendar/CalendarRepository.server";
|
||||
import { MapPool } from "~/features/map-list-generator/core/map-pool";
|
||||
import { clearTournamentDataCache } from "~/features/tournament-bracket/core/Tournament.server";
|
||||
import { useIsMounted } from "~/hooks/useIsMounted";
|
||||
import { i18next } from "~/modules/i18n/i18next.server";
|
||||
import {
|
||||
@@ -77,6 +78,10 @@ export const action: ActionFunction = async ({ params, request }) => {
|
||||
tournamentId: event.tournamentId,
|
||||
});
|
||||
|
||||
if (event.tournamentId) {
|
||||
clearTournamentDataCache(event.tournamentId);
|
||||
}
|
||||
|
||||
throw redirect(CALENDAR_PAGE);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user