MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / run

Method run

packages/server/src/commands/user.ts:20–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 }
19
20 async run(): Promise<void> {
21 const { args } = await this.parse(user)
22
23 let queryRunner: QueryRunner | undefined
24 try {
25 logger.info('Initializing DataSource')
26 const dataSource = await DataSource.getDataSource()
27 await dataSource.initialize()
28
29 queryRunner = dataSource.createQueryRunner()
30 await queryRunner.connect()
31
32 if (args.email && args.password) {
33 logger.info('Running resetPassword')
34 await this.resetPassword(queryRunner, args.email, args.password)
35 } else {
36 logger.info('Running listUserEmails')
37 await this.listUserEmails(queryRunner)
38 }
39 } catch (error) {
40 logger.error(error)
41 } finally {
42 if (queryRunner && !queryRunner.isReleased) await queryRunner.release()
43 await this.gracefullyExit()
44 }
45 }
46
47 async listUserEmails(queryRunner: QueryRunner) {
48 logger.info('Listing all user emails')

Callers

nothing calls this directly

Calls 6

resetPasswordMethod · 0.95
listUserEmailsMethod · 0.95
parseMethod · 0.65
getDataSourceMethod · 0.45
initializeMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected