actionhero
Version:
The reusable, scalable, and quick node.js API server for stateless and stateful applications
16 lines (13 loc) • 396 B
text/typescript
import { Action, Connection } from "../index";
export class SendFile extends Action {
constructor() {
super();
this.name = "sendFile";
this.description = "I send a file though an action";
this.outputExample = {};
}
async run(data: { connection: Connection; toRender: boolean }) {
await data.connection.sendFile("logo/actionhero.png");
data.toRender = false;
}
}