diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-02-13 16:38:09 -0500 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-02-13 16:38:09 -0500 |
commit | 430878f6dd8d36b1322e15d0898ada0d44fecacb (patch) | |
tree | 027fb9b578a3fee8d97b16922a930806da00afaa /src/fields/RichTextField.ts | |
parent | 2eb147ab8f25e6dd90f47cf21499c7340642f0c9 (diff) |
Asdfjkla/sdfklj
Diffstat (limited to 'src/fields/RichTextField.ts')
-rw-r--r-- | src/fields/RichTextField.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fields/RichTextField.ts b/src/fields/RichTextField.ts index f7c3f2430..a7ea1f2ce 100644 --- a/src/fields/RichTextField.ts +++ b/src/fields/RichTextField.ts @@ -1,6 +1,7 @@ import { BasicField } from "./BasicField"; import { Types } from "../server/Message"; import { FIELD_ID } from "./Field"; +import { ObjectID } from "bson"; export class RichTextField extends BasicField<string> { constructor(data: string = "", id: FIELD_ID = undefined) { @@ -15,11 +16,11 @@ export class RichTextField extends BasicField<string> { return new RichTextField(this.Data); } - ToJson(): { type: Types, data: string, id: string } { + ToJson(): { type: Types, data: string, _id: ObjectID } { return { type: Types.RichText, data: this.Data, - id: this.Id as string + _id: new ObjectID(this.Id) } } |