aboutsummaryrefslogtreecommitdiff
path: root/src/server/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/index.ts')
-rw-r--r--src/server/index.ts21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/server/index.ts b/src/server/index.ts
index 83bbe734b..6a06454ec 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -47,7 +47,7 @@ const mongoose = require('mongoose');
const probe = require("probe-image-size");
import * as qs from 'query-string';
import { Opt } from '../new_fields/Doc';
-const extensions = require("../client/util/UtilExtensions");
+const ArrayExtensions = require("../extensions/ArrayExtensions");
const download = (url: string, dest: fs.PathLike) => request.get(url).pipe(fs.createWriteStream(dest));
let youtubeApiKey: string;
@@ -99,6 +99,8 @@ enum Method {
POST
}
+ArrayExtensions.AssignArrayExtensions();
+
/**
* Please invoke this function when adding a new route to Dash's server.
* It ensures that any requests leading to or containing user-sensitive information
@@ -835,18 +837,11 @@ export interface NewMediaItem {
};
}
-Array.prototype.fixedBatch = extensions.FixedBatch;
-Array.prototype.predicateBatch = extensions.PredicateBatch;
-Array.prototype.predicateBatchAsync = extensions.PredicateBatchAsync;
-Array.prototype.batch = extensions.Batch;
-Array.prototype.batchAsync = extensions.BatchAsync;
-
-Array.prototype.batchedForEach = extensions.ExecuteInBatches;
-Array.prototype.batchedMap = extensions.ConvertInBatches;
-Array.prototype.batchedForEachAsync = extensions.ExecuteInBatchesAsync;
-Array.prototype.batchedMapAsync = extensions.ConvertInBatchesAsync;
-Array.prototype.batchedForEachInterval = extensions.ExecuteInBatchesAtInterval;
-Array.prototype.batchedMapInterval = extensions.ConvertInBatchesAtInterval;
+export enum TimeUnit {
+ Milliseconds,
+ Seconds,
+ Minutes
+}
app.post(RouteStore.googlePhotosMediaUpload, async (req, res) => {
const mediaInput: GooglePhotosUploadUtils.MediaInput[] = req.body.media;