Merge pull request #916 from oscarbyrne/fix-swatch-static-paths

Fix: swatch/[name].png.js static path
This commit is contained in:
Felix Roos 2024-01-18 05:09:38 +01:00 committed by GitHub
commit 70b27fbff2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,10 +14,7 @@ export async function GET({ params, request }) {
const ctx = canvas.getContext('2d');
pianoroll({ time: 4, haps, ctx, playhead: 1, fold: 1, background: 'transparent', playheadColor: 'transparent' });
const buffer = canvas.toBuffer('image/png');
return {
body: buffer,
encoding: 'binary',
};
return new Response(buffer);
}
export async function getStaticPaths() {
const patterns = await getMyPatterns();