document-drive 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/server/index.ts +3 -3
- package/src/server/types.ts +1 -1
package/package.json
CHANGED
package/src/server/index.ts
CHANGED
|
@@ -56,9 +56,9 @@ export class DocumentDriveServer implements IDocumentDriveServer {
|
|
|
56
56
|
|
|
57
57
|
async createDocument(driveId: string, input: CreateDocumentInput) {
|
|
58
58
|
const documentModel = this._getDocumentModel(input.documentType);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
|
|
60
|
+
// TODO validate input.document is of documentType
|
|
61
|
+
const document = input.document ?? documentModel.utils.createDocument();
|
|
62
62
|
|
|
63
63
|
return this.storage.saveDocument(driveId, input.id, document);
|
|
64
64
|
}
|
package/src/server/types.ts
CHANGED