mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix bugs
This commit is contained in:
@@ -149,6 +149,12 @@ const components: Array<ComponentMetadata> = [
|
||||
'This is executed when the JSON is successfully merged',
|
||||
id: 'success',
|
||||
},
|
||||
{
|
||||
title: 'Error',
|
||||
description:
|
||||
'This is executed when the JSON is not successfully merged',
|
||||
id: 'error',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -23,6 +23,11 @@ export default class Queue {
|
||||
queueName: QueueName,
|
||||
jobId: string
|
||||
): Promise<void> {
|
||||
|
||||
if(!jobId){
|
||||
return;
|
||||
}
|
||||
|
||||
const job: Job | undefined = await this.getQueue(queueName).getJob(
|
||||
jobId
|
||||
);
|
||||
|
||||
@@ -56,9 +56,9 @@ export default class MergeJSON extends ComponentCode {
|
||||
args['json1'] = JSON.parse(args['json1'] as string);
|
||||
}
|
||||
|
||||
if (typeof args['json2'] !== 'object') {
|
||||
if (typeof args['json1'] !== 'object') {
|
||||
throw options.onError(
|
||||
new BadDataException('JSON2 is should be of type object.')
|
||||
new BadDataException('JSON1 is should be of type object.')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user