diff options
author | madelinegr <laura_wilson@brown.edu> | 2019-02-13 17:40:08 -0500 |
---|---|---|
committer | madelinegr <laura_wilson@brown.edu> | 2019-02-13 17:40:08 -0500 |
commit | bb3ebfa2e3176fdfb648cb7da052e07989fee050 (patch) | |
tree | 95bca297ca99f9bacc4512c44ab573ef5ce7bdae /src/fields | |
parent | 430878f6dd8d36b1322e15d0898ada0d44fecacb (diff) |
broke even
Diffstat (limited to 'src/fields')
-rw-r--r-- | src/fields/Document.ts | 2 | ||||
-rw-r--r-- | src/fields/DocumentReference.ts | 4 | ||||
-rw-r--r-- | src/fields/Field.ts | 2 | ||||
-rw-r--r-- | src/fields/ImageField.ts | 4 | ||||
-rw-r--r-- | src/fields/Key.ts | 4 | ||||
-rw-r--r-- | src/fields/ListField.ts | 4 | ||||
-rw-r--r-- | src/fields/NumberField.ts | 4 | ||||
-rw-r--r-- | src/fields/RichTextField.ts | 4 | ||||
-rw-r--r-- | src/fields/TextField.ts | 4 |
9 files changed, 16 insertions, 16 deletions
diff --git a/src/fields/Document.ts b/src/fields/Document.ts index 56ac3c471..f7239145f 100644 --- a/src/fields/Document.ts +++ b/src/fields/Document.ts @@ -159,7 +159,7 @@ export class Document extends Field { throw new Error("Method not implemented."); } - ToJson(): { type: Types, data: [string, string][], _id: ObjectID } { + ToJson(): { type: Types, data: [string, string][], _id: String } { let fields: [string, string][] = [] this._proxies.forEach((field, key) => { if (field) { diff --git a/src/fields/DocumentReference.ts b/src/fields/DocumentReference.ts index b3d8e059d..c9313a73e 100644 --- a/src/fields/DocumentReference.ts +++ b/src/fields/DocumentReference.ts @@ -43,11 +43,11 @@ export class DocumentReference extends Field { return ""; } - ToJson(): { type: Types, data: FIELD_ID, _id: ObjectID } { + ToJson(): { type: Types, data: FIELD_ID, _id: String } { return { type: Types.DocumentReference, data: this.document.Id, - _id: new ObjectID(this.Id) + _id: this.Id } } }
\ No newline at end of file diff --git a/src/fields/Field.ts b/src/fields/Field.ts index 4b9d996ac..16569e175 100644 --- a/src/fields/Field.ts +++ b/src/fields/Field.ts @@ -65,5 +65,5 @@ export abstract class Field { abstract Copy(): Field; - abstract ToJson(): { _id: ObjectID, type: Types, data: any } + abstract ToJson(): { _id: String, type: Types, data: any } }
\ No newline at end of file diff --git a/src/fields/ImageField.ts b/src/fields/ImageField.ts index 30fe0970b..39eed9398 100644 --- a/src/fields/ImageField.ts +++ b/src/fields/ImageField.ts @@ -20,11 +20,11 @@ export class ImageField extends BasicField<URL> { return new ImageField(this.Data); } - ToJson(): { type: Types, data: URL, _id: ObjectID } { + ToJson(): { type: Types, data: URL, _id: String } { return { type: Types.Image, data: this.Data, - _id: new ObjectID(this.Id) + _id: this.Id } } }
\ No newline at end of file diff --git a/src/fields/Key.ts b/src/fields/Key.ts index ffcbfc8b4..7120c6e3e 100644 --- a/src/fields/Key.ts +++ b/src/fields/Key.ts @@ -33,11 +33,11 @@ export class Key extends Field { return name; } - ToJson(): { type: Types, data: string, _id: ObjectID } { + ToJson(): { type: Types, data: string, _id: String } { return { type: Types.Key, data: this.name, - _id: new ObjectID(this.Id) + _id: this.Id } } } diff --git a/src/fields/ListField.ts b/src/fields/ListField.ts index e98ced902..9a26cb142 100644 --- a/src/fields/ListField.ts +++ b/src/fields/ListField.ts @@ -16,11 +16,11 @@ export class ListField<T extends Field> extends BasicField<T[]> { return new ListField<T>(this.Data); } - ToJson(): { type: Types, data: T[], _id: ObjectId } { + ToJson(): { type: Types, data: T[], _id: String } { return { type: Types.List, data: this.Data, - _id: new ObjectId(this.Id) + _id: this.Id } } }
\ No newline at end of file diff --git a/src/fields/NumberField.ts b/src/fields/NumberField.ts index ce07a18b8..f31be0c25 100644 --- a/src/fields/NumberField.ts +++ b/src/fields/NumberField.ts @@ -16,9 +16,9 @@ export class NumberField extends BasicField<number> { return new NumberField(this.Data); } - ToJson(): { _id: ObjectID, type: Types, data: number } { + ToJson(): { _id: String, type: Types, data: number } { return { - _id: new ObjectID(this.Id), + _id: this.Id, type: Types.Number, data: this.Data } diff --git a/src/fields/RichTextField.ts b/src/fields/RichTextField.ts index a7ea1f2ce..2ed4d11f8 100644 --- a/src/fields/RichTextField.ts +++ b/src/fields/RichTextField.ts @@ -16,11 +16,11 @@ export class RichTextField extends BasicField<string> { return new RichTextField(this.Data); } - ToJson(): { type: Types, data: string, _id: ObjectID } { + ToJson(): { type: Types, data: string, _id: String } { return { type: Types.RichText, data: this.Data, - _id: new ObjectID(this.Id) + _id: this.Id } } diff --git a/src/fields/TextField.ts b/src/fields/TextField.ts index 692b746d1..545aa8c35 100644 --- a/src/fields/TextField.ts +++ b/src/fields/TextField.ts @@ -16,11 +16,11 @@ export class TextField extends BasicField<string> { return new TextField(this.Data); } - ToJson(): { type: Types, data: string, _id: ObjectID } { + ToJson(): { type: Types, data: string, _id: String } { return { type: Types.Text, data: this.Data, - _id: new ObjectID(this.Id) + _id: this.Id } } } |