Complete provisioning job detail pages and lifecycle evidence
This commit is contained in:
@@ -2,8 +2,8 @@ import { json, error } from '@sveltejs/kit';
|
||||
import { db } from '$lib/server/db/index.js';
|
||||
import { getDeployment } from '$lib/server/provisioning/index.js';
|
||||
|
||||
export async function GET({ params }: { params: { id: string } }) {
|
||||
const lifecycle = getDeployment(params.id);
|
||||
export async function GET({ params, url }: { params: { id: string }; url?: URL }) {
|
||||
const lifecycle = getDeployment(params.id, { events: url?.searchParams.get('events') === 'recent' ? 'recent' : 'all' });
|
||||
if (lifecycle) return json(lifecycle);
|
||||
const dep = db()
|
||||
.prepare('SELECT * FROM deployments WHERE id = ?')
|
||||
|
||||
Reference in New Issue
Block a user