This commit is contained in:
2020-04-09 11:11:19 +02:00
parent 999d493c68
commit 64ec1b5db5
4 changed files with 17 additions and 17 deletions

View File

@ -1,4 +1,4 @@
import http from '@scode/consts';
import {http} from '@scode/consts';
export default class Status {
private _status = -1;

View File

@ -22,7 +22,7 @@ export default class Transaction {
}
/* methods */
public finalize (data: any): void {
public finalize (data?: any): void {
if (this._status.has_status)
this._res.status (this.status.status);
this._res.end (data);

View File

@ -1,14 +1,14 @@
import { App } from 'express';
import { Application } from 'express';
import Handler from './classes/Handler';
/**
* register an array of handlers to an express app
*
* @param {App} app express app
* @param {Application} app express app
* @param {Array<Handler>} handlers handlers to register
*/
export default function load_handlers (
app: App,
app: Application,
handlers: Array<Handler>
): void {
for (const h of handlers)