diff --git a/src/app/(home)/Table/Actions.tsx b/src/app/(home)/Table/Actions.tsx index 92b7557..35931c9 100644 --- a/src/app/(home)/Table/Actions.tsx +++ b/src/app/(home)/Table/Actions.tsx @@ -6,7 +6,7 @@ import { DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; import { absoluteLink } from '@/lib/utils'; -import { patchSession } from '@/services/services'; +import { patchSession, sendRegenerateSns } from '@/services/services'; import { type Session, STATUS } from '@/types'; import { AlertTriangle, Copy, LinkIcon, Loader, MoreHorizontal } from 'lucide-react'; import Link from 'next/link'; @@ -62,12 +62,12 @@ const TableActions = ({ session }: { session: Session }) => { {session.is_active ? 'Disable' : 'Enable'} Session - {/* + - */} + ); diff --git a/src/services/services.ts b/src/services/services.ts index d04a3c9..ed32b02 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -158,6 +158,8 @@ export async function createSession(formData: Session) { export const sendCreateSns = (id?: number) => publishMessage({ action: 'db_id', id }); +export const sendRegenerateSns = (id?: number) => publishMessage({ action: 'regenerate_quiz', id }); + /** * Patches a session on the server. * @param {Session} formData - The session data to be patched.