actionhero
Version:
The reusable, scalable, and quick node.js API server for stateless and stateful applications
27 lines (26 loc) • 755 B
JavaScript
;
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 }) {
return { string: params.string };
}
}
exports.ValidationTest = ValidationTest;