We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3576454 commit 0952c73Copy full SHA for 0952c73
apps/svelte.dev/src/routes/(authed)/playground/api/[id].json/+server.ts
@@ -56,8 +56,12 @@ export async function GET({ fetch, params }) {
56
// @ts-ignore
57
owner: app.userid,
58
relaxed: false,
59
- // @ts-expect-error app.files has a `source` property
60
- components: munge(app.files)
+ components: app.files!.map((file) => {
+ const dot = file.name.lastIndexOf('.');
61
+ let name = file.name.slice(0, dot);
62
+ let type = file.name.slice(dot + 1);
63
+ return { name, type, source: file.source };
64
+ })
65
});
66
}
67
0 commit comments