mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
open stratum base message to accept number or string
This commit is contained in:
@@ -3,8 +3,7 @@ import { IsEnum, IsNumber } from 'class-validator';
|
|||||||
import { eRequestMethod } from '../enums/eRequestMethod';
|
import { eRequestMethod } from '../enums/eRequestMethod';
|
||||||
|
|
||||||
export class StratumBaseMessage {
|
export class StratumBaseMessage {
|
||||||
@IsNumber()
|
id?: number | string = null;
|
||||||
id?: number = null;
|
|
||||||
@IsEnum(eRequestMethod)
|
@IsEnum(eRequestMethod)
|
||||||
method: eRequestMethod;
|
method: eRequestMethod;
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ import { eStratumErrorCode } from '../enums/eStratumErrorCode';
|
|||||||
export class StratumErrorMessage {
|
export class StratumErrorMessage {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private id: number = null,
|
private id: number | string = null,
|
||||||
private errorCode: eStratumErrorCode,
|
private errorCode: eStratumErrorCode,
|
||||||
private errorMessage: string,
|
private errorMessage: string,
|
||||||
private validationErrors: ValidationError[] = []
|
private validationErrors: ValidationError[] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user