2
0

init wiki

This commit is contained in:
Cedric Hoelzl 2019-10-15 21:00:25 +02:00
parent c1628b106c
commit 451dadfc41

View File

@ -35,12 +35,12 @@ var verify_word = function verify_word(word) {
"srwhat": "nearmatch" "srwhat": "nearmatch"
}); });
req.end(function (res) { req.end(function (res) {
console.log(res)
if (res.error) reject(res.error); if (res.error) reject(res.error);
var data = res.body.query.search; var data = res.body.query.search;
if (data.length == 0) { if (data.length == 0) {
reject({ info: 'word does not exist' }); reject({ info: 'word does not exist' });
} else { } else {
console.log(data)
resolve(data[0].title); resolve(data[0].title);
} }
}); });