aboutsummaryrefslogtreecommitdiff
path: root/src/server/index.ts
diff options
context:
space:
mode:
authorMohammad Amoush <mohammad_amoush@brown.edu>2019-06-26 19:15:50 -0400
committerMohammad Amoush <mohammad_amoush@brown.edu>2019-06-26 19:15:50 -0400
commit21bc14319013e4757ca24f56a685b7d75eaa259a (patch)
tree9c21ee1dc68273a06386b1cde73d998195f03826 /src/server/index.ts
parent530f38e60d6289a221a463ba36af2ed22c15d8d2 (diff)
Searching through document for a youtube video done
Diffstat (limited to 'src/server/index.ts')
-rw-r--r--src/server/index.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/index.ts b/src/server/index.ts
index 3d4f59ee4..9faeee381 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -24,7 +24,7 @@ import { getForgot, getLogin, getLogout, getReset, getSignup, postForgot, postLo
import { DashUserModel } from './authentication/models/user_model';
import { Client } from './Client';
import { Database } from './database';
-import { MessageStore, Transferable, Types, Diff, YoutubeQueryTypes as YoutubeQueryType } from "./Message";
+import { MessageStore, Transferable, Types, Diff, YoutubeQueryTypes as YoutubeQueryType, YoutubeQueryInput } from "./Message";
import { RouteStore } from './RouteStore';
const app = express();
const config = require('../../webpack.config');
@@ -367,13 +367,13 @@ function GetRefFields([ids, callback]: [string[], (result?: Transferable[]) => v
Database.Instance.getDocuments(ids, callback, "newDocuments");
}
-function HandleYoutubeQuery([type, callback]: [YoutubeQueryType, (result?: string) => void]) {
- switch (type) {
+function HandleYoutubeQuery([query, callback]: [YoutubeQueryInput, (result?: string) => void]) {
+ switch (query.type) {
case YoutubeQueryType.Channels:
YoutubeApi.authorizedGetChannel(youtubeApiKey);
break;
case YoutubeQueryType.SearchVideo:
- YoutubeApi.authorizedGetVideos(youtubeApiKey);
+ YoutubeApi.authorizedGetVideos(youtubeApiKey, query.userInput);
}
}