feat: add logout route
This commit is contained in:
parent
b717c55643
commit
8a49137474
|
|
@ -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('/');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue