The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/apps/server/communication/endpoints/actionButtonsHandler.ts

19 lines
504 B

import { AppManager } from '@rocket.chat/apps-engine/server/AppManager';
import { API } from '../../../../api/server';
import { AppsRestApi } from '../rest';
export const actionButtonsHandler = (apiManager: AppsRestApi): [Record<string, any>, Record<string, Function>] => [
{
authRequired: false,
},
{
get(): any {
const manager = apiManager._manager as AppManager;
const buttons = manager.getUIActionButtonManager().getAllActionButtons();
return API.v1.success(buttons);
},
},
];