(toastInput: ToastInput)
| 38 | } |
| 39 | |
| 40 | export async function createToastHeaders(toastInput: ToastInput) { |
| 41 | const session = await toastSessionStorage.getSession() |
| 42 | const toast = ToastSchema.parse(toastInput) |
| 43 | session.flash(toastKey, toast) |
| 44 | const cookie = await toastSessionStorage.commitSession(session) |
| 45 | return new Headers({ 'set-cookie': cookie }) |
| 46 | } |
| 47 | |
| 48 | export async function getToast(request: Request) { |
| 49 | const session = await toastSessionStorage.getSession( |
no outgoing calls
no test coverage detected