How to use the sharedb.SubmitRequest function in sharedb

To help you get started, we’ve selected a few sharedb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Webstrates / Webstrates / helpers / ShareDBWrapper.js View on Github external
module.exports.submitOp = (webstrateId, op, next) => {
	// https://github.com/share/sharedb/blob/master/lib/backend.js
	// Maybe this method is unnecessary and could be replaced by just submit. But that will
	// trigger the submit event, this won't, so I don't know.
	const request = new sharedb.SubmitRequest(share, agent, COLLECTION_NAME, webstrateId, op);
	request.submit(next);
};