Improvements in collection storage. Breaks compatibility with previous versions!
This commit is contained in:
@ -3,6 +3,10 @@ export type Release = { release: () => void };
|
||||
export default class DocumentLock {
|
||||
private locks = new Map<string, (() => void)[]>();
|
||||
|
||||
getLocks() {
|
||||
return Array.from(this.locks.keys())
|
||||
}
|
||||
|
||||
async lock(collection: string = "", document: string = "") {
|
||||
let key = collection + "/" + document;
|
||||
let l = this.locks.get(key);
|
||||
|
Reference in New Issue
Block a user