MCPcopy Index your code
hub / github.com/MALSync/MALSync / injectDb

Function injectDb

src/index.ts:142–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

140
141let dbActive = false;
142function injectDb() {
143 api.request.database = async (call, param) => {
144 if (!dbActive) {
145 await initDatabase();
146 dbActive = true;
147 }
148 return databaseRequest(call, param);
149 };
150}

Callers 1

mainFunction · 0.85

Calls 2

initDatabaseFunction · 0.90
databaseRequestFunction · 0.90

Tested by

no test coverage detected