Commit 03a6514b authored by Tammo Ronke's avatar Tammo Ronke
parents 3b6e7b5b d0a57dca
var request = require("sync-request");
//const HOST = "https://evil-octopus-34.localtunnel.me/";
const HOST = "https://suggestions32435342.localtunnel.me";
const HOST = "https://suggestions32435342.localtunnel.me/";
var querySuggestions = (keyword, read_time, difficulty) => {
var url = `${HOST}suggestions?keyword=${normalize(
......@@ -24,8 +24,9 @@ var querySuggestions = (keyword, read_time, difficulty) => {
return data;
};
var normalize = string => {
string.replace(" ", "-");
var normalize = s => {
while (s.includes(" ")) s = s.replace(" ", "-");
return s;
};
var fetchJsonSync = url => {
......
......@@ -62,7 +62,7 @@ module.exports = [
session.dialogData.skillLevel
);
suggestionStore.addHistory(suggestions);
//suggestionStore.addHistory(suggestions);
session.replaceDialog("suggestions", suggestions);
next();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment