modify bug in db connectionLimit、login
This commit is contained in:
parent
4ca4ef1d62
commit
a69230d41f
@ -8,7 +8,7 @@ router.get("/", async function(req, res) {
|
||||
let conn;
|
||||
try {
|
||||
conn = await util.getDBConnection(); // get connection from db
|
||||
const query = ` //語法有問題
|
||||
const query = `
|
||||
SELECT
|
||||
item_form.application_id,
|
||||
item_form.item_info_id,
|
||||
@ -20,7 +20,7 @@ router.get("/", async function(req, res) {
|
||||
FROM
|
||||
item_form
|
||||
RIGHT JOIN
|
||||
scholarship_application ON item_form.application_id = scholarship_application.application_id;
|
||||
scholarship_application ON item_form.application_id = scholarship_application.application_id
|
||||
RIGHT JOIN
|
||||
student ON scholarship_application.student_id = student.student_id;
|
||||
`;
|
||||
|
||||
@ -3,10 +3,11 @@ async function submit() {
|
||||
const password = document.getElementById("password").value;
|
||||
console.log(account, password);
|
||||
let data = {account : account, password : password};
|
||||
let suc_login = await axios.post('/api/login', data);
|
||||
let suc_login = await axios.post('http://163.22.17.184:5000/api/login', data);
|
||||
suc_login = suc_login.data;
|
||||
console.log(suc_login);
|
||||
if (suc_login.suc) {
|
||||
|
||||
location.href = '/main';
|
||||
}
|
||||
else {
|
||||
|
||||
@ -4,7 +4,7 @@ const db = require("mariadb");
|
||||
|
||||
// create pool
|
||||
const pool = db.createPool({
|
||||
connectionLimit : 500,
|
||||
connectionLimit : 10,
|
||||
host : 'localhost',
|
||||
user : 'root',
|
||||
password : '',
|
||||
|
||||
@ -4,7 +4,7 @@ const db = require("mariadb");
|
||||
|
||||
// create pool
|
||||
const pool = db.createPool({
|
||||
connectionLimit : 500,
|
||||
connectionLimit : 10,
|
||||
host : 'localhost',
|
||||
user : 'user',
|
||||
password : '',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user