diff options
Diffstat (limited to 'src/fields/ImageField.ts')
-rw-r--r-- | src/fields/ImageField.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fields/ImageField.ts b/src/fields/ImageField.ts index 8ffc6d680..30fe0970b 100644 --- a/src/fields/ImageField.ts +++ b/src/fields/ImageField.ts @@ -1,6 +1,7 @@ import { BasicField } from "./BasicField"; import { Field, FIELD_ID } from "./Field"; import { Types } from "../server/Message"; +import { ObjectID } from "bson"; export class ImageField extends BasicField<URL> { constructor(data: URL | undefined = undefined, id: FIELD_ID = undefined) { @@ -19,11 +20,11 @@ export class ImageField extends BasicField<URL> { return new ImageField(this.Data); } - ToJson(): { type: Types, data: URL, id: string } { + ToJson(): { type: Types, data: URL, _id: ObjectID } { return { type: Types.Image, data: this.Data, - id: this.Id as string + _id: new ObjectID(this.Id) } } }
\ No newline at end of file |