Fix blocing enum on user config page

This commit is contained in:
Sacha Weatherstone
2022-08-06 13:56:11 +10:00
parent dcc41e8d82
commit 1dd239ca09
4 changed files with 318 additions and 271 deletions
+5 -6
View File
@@ -1,8 +1,10 @@
import { IsBoolean, IsEnum, IsInt, Length } from "class-validator";
import { IsBoolean, IsInt, Length } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
import type { Protobuf } from "@meshtastic/meshtasticjs";
export class UserValidation implements Omit<Protobuf.User, "macaddr"> {
export class UserValidation
implements Omit<Protobuf.User, "macaddr" | "hwModel">
{
@Length(2, 30)
id: string;
@@ -12,9 +14,6 @@ export class UserValidation implements Omit<Protobuf.User, "macaddr"> {
@Length(1, 4)
shortName: string;
@IsEnum(Protobuf.HardwareModel)
hwModel: Protobuf.HardwareModel;
@IsBoolean()
isLicensed: boolean;