feat: accept userId
This commit is contained in:
@@ -13,7 +13,7 @@ import { getDecryptedProxyConfig } from './proxy';
|
|||||||
import { requireSignIn } from '../middlewares/auth';
|
import { requireSignIn } from '../middlewares/auth';
|
||||||
import Robot from '../models/Robot';
|
import Robot from '../models/Robot';
|
||||||
import Run from '../models/Run';
|
import Run from '../models/Run';
|
||||||
// import { workflowQueue } from '../worker';
|
import { workflowQueue } from '../worker';
|
||||||
|
|
||||||
// todo: move from here
|
// todo: move from here
|
||||||
export const getRecordingByFileName = async (fileName: string): Promise<any | null> => {
|
export const getRecordingByFileName = async (fileName: string): Promise<any | null> => {
|
||||||
@@ -315,17 +315,18 @@ router.put('/schedule/:id/', requireSignIn, async (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const runId = uuid();
|
const runId = uuid();
|
||||||
|
const userId = req.user.id;
|
||||||
|
|
||||||
// await workflowQueue.add(
|
await workflowQueue.add(
|
||||||
// 'run workflow',
|
'run workflow',
|
||||||
// { id, runId, req.user.id },
|
{ id, runId, userId },
|
||||||
// {
|
{
|
||||||
// repeat: {
|
repeat: {
|
||||||
// pattern: cronExpression,
|
pattern: cronExpression,
|
||||||
// tz: timezone
|
tz: timezone
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// );
|
);
|
||||||
|
|
||||||
res.status(200).json({
|
res.status(200).json({
|
||||||
message: 'success',
|
message: 'success',
|
||||||
|
|||||||
Reference in New Issue
Block a user