UNPKG

actionhero

Version:

actionhero.js is a multi-transport API Server with integrated cluster capabilities and delayed tasks

21 lines (20 loc) 610 B
"use strict"; 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, response }) { response.didCreate = await index_1.chatRoom.add(params.name); } } exports.CreateChatRoom = CreateChatRoom;