set-prefs.js — astro Source File
Architecture documentation for set-prefs.js, a javascript file in the astro codebase.
Entity Profile
Relationship Graph
Source Code
export function POST({ cookies }) {
const mode = cookies.get('prefs').json().mode;
cookies.set('prefs', {
mode: mode === 'light' ? 'dark' : 'light'
});
return new Response(null, {
status: 302,
headers: {
'Location': '/prefs'
}
});
}
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does set-prefs.js do?
set-prefs.js is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain, SsrAdapters subdomain.
What functions are defined in set-prefs.js?
set-prefs.js defines 1 function(s): POST.
Where is set-prefs.js in the architecture?
set-prefs.js is located at packages/astro/test/fixtures/astro-cookies/src/pages/set-prefs.js (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test/fixtures/astro-cookies/src/pages).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free