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

Function isConnectionSaved

devtools/modules/connectionStorageManager.js:123–136  ·  view source on GitHub ↗
(originalId)

Source from the content-addressed store, hash-verified

121}
122
123export async function isConnectionSaved(originalId) {
124 const database = await initDB();
125 return new Promise((resolve, reject) => {
126 const transaction = database.transaction([STORE_NAME], 'readonly');
127 const store = transaction.objectStore(STORE_NAME);
128 const index = store.index('originalId');
129 const request = index.get(originalId);
130
131 request.onsuccess = () => {
132 resolve(!!request.result);
133 };
134 request.onerror = () => reject(request.error);
135 });
136}
137
138export async function getConnectionByOriginalId(originalId) {
139 const database = await initDB();

Callers 2

showSaveConnectionModalFunction · 0.90
renderConnectionListFunction · 0.90

Calls 1

initDBFunction · 0.70

Tested by

no test coverage detected