This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { artifactFormBody } from '$lib/server/request-body.js';
|
||||
import { json } from '@sveltejs/kit';
|
||||
import {
|
||||
createScript,
|
||||
@@ -38,7 +39,7 @@ export async function GET({ url }: { url: URL }) {
|
||||
// name, scopeType, scopeValue, notes, releaseVersion, kind (defaults to 'script'),
|
||||
// content (file). Configs may alternatively send `text` as a form field.
|
||||
export async function POST({ request, url }: { request: Request; url: URL }) {
|
||||
const form = await request.formData();
|
||||
const form = await artifactFormBody(request);
|
||||
const name = String(form.get('name') ?? '').trim();
|
||||
const notes = form.get('notes') ? String(form.get('notes')) : undefined;
|
||||
let scopeType: ScopeType | null;
|
||||
|
||||
Reference in New Issue
Block a user