MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / releaseLock

Function releaseLock

lib/interfaces/webdav-locks.ts:110–121  ·  view source on GitHub ↗
(userId: string, path: string, presentedToken: string)

Source from the content-addressed store, hash-verified

108}
109
110export function releaseLock(userId: string, path: string, presentedToken: string): boolean {
111 const key = buildKey(userId, path);
112 const lock = locksByKey.get(key);
113
114 if (!lock || isExpired(lock) || lock.token !== presentedToken) {
115 return false;
116 }
117
118 locksByKey.delete(key);
119
120 return true;
121}

Callers 1

handlerFunction · 0.90

Calls 4

buildKeyFunction · 0.85
isExpiredFunction · 0.85
getMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected