fix
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import http from '@scode/consts';
|
||||
import {http} from '@scode/consts';
|
||||
|
||||
export default class Status {
|
||||
private _status = -1;
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user