AXCWG 2 tháng trước cách đây
mục cha
commit
5b2bca66a3
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      main.js

+ 1 - 1
main.js

@@ -457,7 +457,7 @@ app.options('/submit', function (req, res) {
 
 
 app.post('/search_api', async function (req, res) {
-
+    req.body.searchStr = req.body.searchStr.trim();
     db.execute("SELECT uuid, song_name, album_name, artist, kind FROM instrunet_entry WHERE song_name like ? or album_name like ? or artist like ?", [`%${req.body.searchStr}%`, `%${req.body.searchStr}%`, `%${req.body.searchStr}%`], async (err, rowsO) => {
         if (err) {
             console.log(err)