|
|
@ -13,7 +13,7 @@ export async function post(req, res) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const { name, components, json5 } = await body(req);
|
|
|
|
const { name, components } = await body(req);
|
|
|
|
|
|
|
|
|
|
|
|
const files = {
|
|
|
|
const files = {
|
|
|
|
'meta.json': {
|
|
|
|
'meta.json': {
|
|
|
@ -33,10 +33,6 @@ export async function post(req, res) {
|
|
|
|
files[file] = { content: component.source };
|
|
|
|
files[file] = { content: component.source };
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (json5) {
|
|
|
|
|
|
|
|
files['data.json5'] = { content: json5 };
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const r = await fetch(`https://api.github.com/gists`, {
|
|
|
|
const r = await fetch(`https://api.github.com/gists`, {
|
|
|
|
method: 'POST',
|
|
|
|
method: 'POST',
|
|
|
|
headers: {
|
|
|
|
headers: {
|
|
|
|