Add publisher release versions to plugins
This commit is contained in:
@@ -42,6 +42,7 @@ export async function GET({ url }: { url: URL }) {
|
||||
? {
|
||||
id: versions[0].id,
|
||||
version: versions[0].version,
|
||||
release_version: versions[0].release_version,
|
||||
sha256: versions[0].sha256,
|
||||
size: versions[0].size,
|
||||
state: versions[0].state,
|
||||
@@ -58,7 +59,7 @@ export async function GET({ url }: { url: URL }) {
|
||||
|
||||
// Multipart POST — creates an artifact + version 1 from either an uploaded
|
||||
// file (script/plugin/baseline) or a text body (config overlay). Fields:
|
||||
// name, scopeType, scopeValue, notes, kind (defaults to 'script'),
|
||||
// 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();
|
||||
@@ -104,6 +105,7 @@ export async function POST({ request, url }: { request: Request; url: URL }) {
|
||||
scopeValue,
|
||||
content,
|
||||
notes,
|
||||
releaseVersion: form.has('releaseVersion') ? String(form.get('releaseVersion')) : undefined,
|
||||
kind
|
||||
});
|
||||
return json({ ok: true, script, versionId: version.id });
|
||||
|
||||
Reference in New Issue
Block a user