open stratum base message to accept number or string

This commit is contained in:
Benjamin Wilson
2024-07-05 08:19:37 -04:00
parent 811e7972f9
commit f08103bd8c
2 changed files with 2 additions and 3 deletions
@@ -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[] = []