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",
|
"name": "@pushrocks/smartstatus",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartstatus",
|
"name": "@pushrocks/smartstatus",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "status information in TypeScript",
|
"description": "status information in TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -2,12 +2,12 @@ export type TStatusGroup = 'clientError' | 'serverError';
|
|||||||
|
|
||||||
export class HttpStatus {
|
export class HttpStatus {
|
||||||
protected static statusMap: {[key:string]: HttpStatus} = {};
|
protected static statusMap: {[key:string]: HttpStatus} = {};
|
||||||
public static getHttpStatusByString (codeArg: number) {
|
public static getHttpStatusByString (codeStringArg: string) {
|
||||||
return HttpStatus.statusMap[codeArg.toString()];
|
return HttpStatus.statusMap[codeStringArg];
|
||||||
}
|
}
|
||||||
code: number;
|
public code: number;
|
||||||
text: string;
|
public text: string;
|
||||||
description: string;
|
public description: string;
|
||||||
constructor(optionsArg: { code: number; text: string; description: string }) {
|
constructor(optionsArg: { code: number; text: string; description: string }) {
|
||||||
this.code = optionsArg.code;
|
this.code = optionsArg.code;
|
||||||
this.text = optionsArg.text;
|
this.text = optionsArg.text;
|
||||||
|
Reference in New Issue
Block a user