actionhero
Version:
The reusable, scalable, and quick node.js API server for stateless and stateful applications
21 lines (20 loc) • 601 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateChatRoom = void 0;
const index_1 = require("./../index");
class CreateChatRoom extends index_1.Action {
constructor() {
super();
this.name = "createChatRoom";
this.description = "I will create a chatroom with the given name";
this.inputs = {
name: {
required: true,
},
};
}
async run({ params }) {
return { didCreate: await index_1.chatRoom.add(params.name) };
}
}
exports.CreateChatRoom = CreateChatRoom;