useCookies function
Returns a Cookies instance for the event
.
Implementation
Cookies useCookies(Event event) {
return switch (event.get<Cookies>(_kCookies)) {
Cookies cookies => cookies,
_ => throw createError(
'Cookies are not enabled.'
'Please enable using `app.use(enableCookie(...))`',
),
};
}