jack 3 weeks ago
parent
commit
a78fd7c2a8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      routes/router.js

+ 1 - 1
routes/router.js

@@ -46,7 +46,7 @@ router.route('/update').post(async function (req, res) {
     const queryList = [_mysqluser[0], _mysqluser[1], "update_registration", url, id_number, Number(type)];
     mysql.usselect(queryList, function (data) {
         console.log(data);
-        if (data == 1) {
+        if (data[0] && data[0][0]) {
             res.send({ status: 'ok', message: '报名信息更新成功' });
         } else {
             res.send({ status: 'error', message: '未找到报名信息' });