MCPcopy Create free account
hub / github.com/bywwcnll/StreamPanel / loadConnection

Function loadConnection

devtools/panel.bundle.js:255–271  ·  view source on GitHub ↗
(savedId)

Source from the content-addressed store, hash-verified

253 }
254
255 async function loadConnection(savedId) {
256 const database = await initDB();
257 return new Promise((resolve, reject) => {
258 const transaction = database.transaction([STORE_NAME], 'readonly');
259 const store = transaction.objectStore(STORE_NAME);
260 const request = store.get(savedId);
261
262 request.onsuccess = () => {
263 if (request.result) {
264 resolve(request.result);
265 } else {
266 resolve(null);
267 }
268 };
269 request.onerror = () => reject(request.error);
270 });
271 }
272
273 async function deleteConnection(savedId) {
274 const database = await initDB();

Callers 1

loadSavedConnectionFunction · 0.70

Calls 1

initDBFunction · 0.70

Tested by

no test coverage detected