Refactor db and local-cache code
Separated cwmp and ui code into distinct files to enhance clarity and maintainability with varied internal data representations.
This commit is contained in:
1 parent
493f1d2f37
commit
c3954c277f
31 files changed
+1542
-1530
No files matched your search
@@ -20,18 +20,11 @@
|
||||
import * as url from "url";
|
||||
import { IncomingMessage, ServerResponse } from "http";
|
||||
import { PassThrough, pipeline, Readable } from "stream";
|
||||
import { GridFSBucket } from "mongodb";
|
||||
import { onConnect, collections } from "./db";
|
||||
import { filesBucket, collections } from "./db/db";
|
||||
import * as logger from "./logger";
|
||||
import { getRequestOrigin } from "./forwarded";
|
||||
import memoize from "./common/memoize";
|
||||
|
||||
let filesBucket: GridFSBucket;
|
||||
|
||||
onConnect(async (db) => {
|
||||
filesBucket = new GridFSBucket(db);
|
||||
});
|
||||
|
||||
const getFile = memoize(
|
||||
async (
|
||||
uploadDate: number,
|
||||
|
||||
Reference in new issue
Block a user