feat: add logout route

This commit is contained in:
Nicola Zambello 2023-02-14 10:21:17 +01:00
parent b717c55643
commit 8a49137474
Signed by: nzambello
GPG key ID: 56E4A92C2C1E50BA

View file

@ -1,12 +1,12 @@
import type { ActionArgs } from '@remix-run/node' import type { ActionArgs } from '@remix-run/node';
import { redirect } from '@remix-run/node' import { redirect } from '@remix-run/node';
import { logout } from '~/session.server' import { logout } from '~/session.server';
export async function action({ request }: ActionArgs) { export async function action({ request }: ActionArgs) {
return logout(request) return logout(request);
} }
export async function loader() { export async function loader() {
return redirect('/') return redirect('/');
} }