changed api and scheme

This commit is contained in:
2025-11-17 21:20:57 +01:00
parent d2ee9d73c7
commit 757e13efe4
3 changed files with 122 additions and 38 deletions

View File

@@ -21,7 +21,7 @@ export const getItemsFromDatabaseV2 = async () => {
export const getLoanByCodeV2 = async (loan_code) => {
const [result] = await pool.query(
"SELECT * FROM loans WHERE loan_code = ?;",
"SELECT username, returned_date, take_date, lockers FROM loans WHERE loan_code = ?;",
[loan_code]
);
if (result.length > 0) {