feat: add login bool while saving workflow
This commit is contained in:
@@ -134,9 +134,9 @@ export class WorkflowGenerator {
|
|||||||
*/
|
*/
|
||||||
private registerEventHandlers = (socket: Socket) => {
|
private registerEventHandlers = (socket: Socket) => {
|
||||||
socket.on('save', (data) => {
|
socket.on('save', (data) => {
|
||||||
const { fileName, userId } = data;
|
const { fileName, userId, isLogin } = data;
|
||||||
logger.log('debug', `Saving workflow ${fileName} for user ID ${userId}`);
|
logger.log('debug', `Saving workflow ${fileName} for user ID ${userId}`);
|
||||||
this.saveNewWorkflow(fileName, userId);
|
this.saveNewWorkflow(fileName, userId, isLogin);
|
||||||
});
|
});
|
||||||
socket.on('new-recording', () => this.workflowRecord = {
|
socket.on('new-recording', () => this.workflowRecord = {
|
||||||
workflow: [],
|
workflow: [],
|
||||||
@@ -660,7 +660,7 @@ export class WorkflowGenerator {
|
|||||||
* @param fileName The name of the file.
|
* @param fileName The name of the file.
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
public saveNewWorkflow = async (fileName: string, userId: number) => {
|
public saveNewWorkflow = async (fileName: string, userId: number, isLogin: boolean) => {
|
||||||
const recording = this.optimizeWorkflow(this.workflowRecord);
|
const recording = this.optimizeWorkflow(this.workflowRecord);
|
||||||
try {
|
try {
|
||||||
this.recordingMeta = {
|
this.recordingMeta = {
|
||||||
@@ -675,6 +675,7 @@ export class WorkflowGenerator {
|
|||||||
userId,
|
userId,
|
||||||
recording_meta: this.recordingMeta,
|
recording_meta: this.recordingMeta,
|
||||||
recording: recording,
|
recording: recording,
|
||||||
|
isLogin: isLogin,
|
||||||
});
|
});
|
||||||
capture(
|
capture(
|
||||||
'maxun-oss-robot-created',
|
'maxun-oss-robot-created',
|
||||||
|
|||||||
Reference in New Issue
Block a user