Skip to content

Commit 34f8901

Browse files
exposed fields should be picked
1 parent c669cbd commit 34f8901

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

apps/meteor/app/api/server/v1/commands.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const commandsEndpoints = API.v1.get(
3535
400: validateBadRequestErrorResponse,
3636
401: validateUnauthorizedErrorResponse,
3737
200: ajv.compile<{
38-
command: ISlashCommand;
38+
command: Pick<ISlashCommand, 'clientOnly' | 'command' | 'description' | 'params' | 'providesPreview'>;
3939
success: true;
4040
}>({
4141
type: 'object',
@@ -61,7 +61,15 @@ const commandsEndpoints = API.v1.get(
6161
return API.v1.failure(`There is no command in the system by the name of: ${params.command}`);
6262
}
6363

64-
return API.v1.success({ command: cmd });
64+
return API.v1.success({
65+
command: {
66+
command: cmd.command,
67+
description: cmd.description,
68+
params: cmd.params,
69+
clientOnly: cmd.clientOnly,
70+
providesPreview: cmd.providesPreview,
71+
},
72+
});
6573
},
6674
);
6775

0 commit comments

Comments
 (0)