Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
c0f411e261 | |||
09e3ea8733 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartstatus",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartstatus",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"private": false,
|
||||
"description": "status information in TypeScript",
|
||||
"main": "dist/index.js",
|
||||
|
@ -2,12 +2,12 @@ export type TStatusGroup = 'clientError' | 'serverError';
|
||||
|
||||
export class HttpStatus {
|
||||
protected static statusMap: {[key:string]: HttpStatus} = {};
|
||||
public static getHttpStatusByString (codeArg: number) {
|
||||
return HttpStatus.statusMap[codeArg.toString()];
|
||||
public static getHttpStatusByString (codeStringArg: string) {
|
||||
return HttpStatus.statusMap[codeStringArg];
|
||||
}
|
||||
code: number;
|
||||
text: string;
|
||||
description: string;
|
||||
public code: number;
|
||||
public text: string;
|
||||
public description: string;
|
||||
constructor(optionsArg: { code: number; text: string; description: string }) {
|
||||
this.code = optionsArg.code;
|
||||
this.text = optionsArg.text;
|
||||
|
Reference in New Issue
Block a user