fix integer checking

master
sigonasr2, Sig, Sigo 3 years ago
parent 3b84dcb51a
commit 4507b6696c
  1. 6
      server.js
  2. 6
      server_test.js

@ -1097,7 +1097,11 @@ function buildsGet(req,res,db) {
case "class2":{return "class2"}break; case "class2":{return "class2"}break;
} }
} }
return `${filter_type?`where ${ConvertFilterType(filter_type)} ilike '%${filter}%'`:""}` if (filter_type=="class1"||filter_type=="class2") {
return `${filter_type?`where ${filter_type}=${filter}`:""}`
} else {
return `${filter_type?`where ${ConvertFilterType(filter_type)} ilike '%${filter}%'`:""}`
}
} }
function SortQuery(sort_type){ function SortQuery(sort_type){
function ConvertSortType(sor) { function ConvertSortType(sor) {

@ -1051,7 +1051,11 @@ function buildsGet(req,res,db) {
case "class2":{return "class2"}break; case "class2":{return "class2"}break;
} }
} }
return `${filter_type?`where ${ConvertFilterType(filter_type)} ilike '%${filter}%'`:""}` if (filter_type=="class1"||filter_type=="class2") {
return `${filter_type?`where ${filter_type}=${filter}`:""}`
} else {
return `${filter_type?`where ${ConvertFilterType(filter_type)} ilike '%${filter}%'`:""}`
}
} }
function SortQuery(sort_type){ function SortQuery(sort_type){
function ConvertSortType(sor) { function ConvertSortType(sor) {

Loading…
Cancel
Save