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/ui-message/client/blocks/Blocks.js

31 lines
613 B

import { Template } from 'meteor/templating';
import { APIClient } from '../../../utils';
import './Blocks.html';
Template.Blocks.events({
async 'click button'() {
console.log(await APIClient.post('api/apps/blockit/meu_app/outra_action'));
},
});
Template.Blocks.helpers({
template() {
const { type } = this;
console.log(type);
switch (type) {
case 'section':
return 'SectionBlock';
case 'divider':
return 'DividerBlock';
case 'image':
return 'ImageBlock';
case 'actions':
return 'ActionsBlock';
}
},
data() {
const { type, ...data } = this;
return data;
},
});