diff options
Diffstat (limited to 'src/fields/Key.ts')
-rw-r--r-- | src/fields/Key.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fields/Key.ts b/src/fields/Key.ts index 084b444a6..ffcbfc8b4 100644 --- a/src/fields/Key.ts +++ b/src/fields/Key.ts @@ -2,6 +2,7 @@ import { Field, FIELD_ID } from "./Field" import { Utils } from "../Utils"; import { observable } from "mobx"; import { Types } from "../server/Message"; +import { ObjectID } from "bson"; export class Key extends Field { private name: string; @@ -32,11 +33,11 @@ export class Key extends Field { return name; } - ToJson(): { type: Types, data: string, id: string } { + ToJson(): { type: Types, data: string, _id: ObjectID } { return { type: Types.Key, data: this.name, - id: this.Id as string + _id: new ObjectID(this.Id) } } } |