Create empty command (#2963)
* create empty command * update description * rebase --------- Co-authored-by: corentin <corentin@twenty.com>
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { FetchWorkspaceMessagesCommand } from 'src/workspace/messaging/commands/fetch-workspace-messages.command';
|
||||
|
||||
@Module({
|
||||
imports: [],
|
||||
providers: [FetchWorkspaceMessagesCommand],
|
||||
})
|
||||
export class FetchWorkspaceMessagesCommandsModule {}
|
||||
@ -0,0 +1,29 @@
|
||||
import { Command, CommandRunner, Option } from 'nest-commander';
|
||||
|
||||
interface FetchWorkspaceMessagesOptions {
|
||||
workspaceId: string;
|
||||
}
|
||||
|
||||
@Command({
|
||||
name: 'workspace:fetch-messages',
|
||||
description: 'Fetch messages of all workspaceMembers in a workspace.',
|
||||
})
|
||||
export class FetchWorkspaceMessagesCommand extends CommandRunner {
|
||||
async run(
|
||||
_passedParam: string[],
|
||||
options: FetchWorkspaceMessagesOptions,
|
||||
): Promise<void> {
|
||||
console.log('fetching messages for workspace', options.workspaceId);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@Option({
|
||||
flags: '-w, --workspace-id [workspace_id]',
|
||||
description: 'workspace id',
|
||||
required: true,
|
||||
})
|
||||
parseWorkspaceId(value: string): string {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user