mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
decodeURIComponent in try
This commit is contained in:
parent
2a2eabc97c
commit
b6c2495244
3 changed files with 9 additions and 3 deletions
|
@ -297,7 +297,13 @@ app.get('/ask', function (req, res) {
|
||||||
} else {
|
} else {
|
||||||
if (req.query.q && req.query.data) {
|
if (req.query.q && req.query.data) {
|
||||||
let subj = req.query.subj || ''
|
let subj = req.query.subj || ''
|
||||||
let question = decodeURIComponent(req.query.q)
|
let question
|
||||||
|
try {
|
||||||
|
question = decodeURIComponent(req.query.q)
|
||||||
|
} catch (e) {
|
||||||
|
console.error(req.query)
|
||||||
|
throw e
|
||||||
|
}
|
||||||
let recData = {}
|
let recData = {}
|
||||||
try {
|
try {
|
||||||
recData = JSON.parse(req.query.data)
|
recData = JSON.parse(req.query.data)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 194fc22d06adc664aa1a8a3a02a81edae613f888
|
Subproject commit f69734e571ec02d6c7de6ecabe8ca83c8bc62623
|
|
@ -1 +1 @@
|
||||||
Subproject commit 40f187881337f2c3f3fe50a3799d7f46d4c6361c
|
Subproject commit a117239f35610520706e402382c3911d422d743e
|
Loading…
Add table
Add a link
Reference in a new issue