housekeeping

This commit is contained in:
orangecoding
2026-06-03 09:59:32 +02:00
parent 322ae199b0
commit c29387c85d
7 changed files with 62 additions and 64 deletions

View File

@@ -195,6 +195,9 @@ export default async function jobPlugin(fastify) {
const settings = await getSettings();
try {
const job = jobStorage.getJob(jobId);
if (!job) {
return reply.code(404).send({ error: 'Job not found' });
}
if (settings.demoMode && !isAdmin(request) && job.name === DEMO_JOB_NAME) {
return reply.code(403).send({ error: 'Sorry, but you cannot remove the Demo Job ;)' });
}
@@ -216,6 +219,9 @@ export default async function jobPlugin(fastify) {
const settings = await getSettings();
try {
const job = jobStorage.getJob(jobId);
if (!job) {
return reply.code(404).send({ error: 'Job not found' });
}
if (settings.demoMode && !isAdmin(request) && job.name === DEMO_JOB_NAME) {
return reply.code(403).send({ error: 'Sorry, but you cannot change the Status of our Demo Job ;)' });