fix(core): update

This commit is contained in:
2019-01-02 01:00:53 +01:00
parent 55eb01c425
commit 8900619bc9
30 changed files with 1945 additions and 2658 deletions

View File

@@ -1,20 +1,23 @@
export type TStatusGroup = 'clientError' | 'serverError'
export type TStatusGroup = 'clientError' | 'serverError';
export class HttpStatus {
code: number
text: string
description: string
constructor (optionsArg: {
code: number,
text: string,
description: string
}) {
protected static statusMap: {[key:string]: HttpStatus} = {};
public static getHttpStatusByString (codeArg: number) {
return HttpStatus.statusMap[codeArg.toString()];
}
code: number;
text: string;
description: string;
constructor(optionsArg: { code: number; text: string; description: string }) {
this.code = optionsArg.code;
this.text = optionsArg.text;
this.description = optionsArg.description;
HttpStatus.statusMap[this.code.toString()] = this;
}
}
export * from './smartstatus.classes.http.1xx'
export * from './smartstatus.classes.http.2xx'
export * from './smartstatus.classes.http.3xx'
export * from './smartstatus.classes.http.4xx'
export * from './smartstatus.classes.http.5xx'
export * from './smartstatus.classes.http.1xx';
export * from './smartstatus.classes.http.2xx';
export * from './smartstatus.classes.http.3xx';
export * from './smartstatus.classes.http.4xx';
export * from './smartstatus.classes.http.5xx';