UNPKG

actionhero

Version:

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

27 lines (26 loc) 764 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ValidationTest = void 0; const index_1 = require("./../index"); class ValidationTest extends index_1.Action { constructor() { super(); this.name = "validationTest"; this.description = "I will test action input validators."; this.inputs = { string: { required: true, validator: (param) => { return typeof param === "string"; }, }, }; this.outputExample = { string: "imAString!", }; } async run({ params, response }) { response.string = params.string; } } exports.ValidationTest = ValidationTest;