refactored code

This commit is contained in:
2025-10-26 13:39:09 +01:00
parent 7e668e17d3
commit a8821ceca8

View File

@@ -349,7 +349,6 @@ export const createLoanInDatabase = async (
}; };
// These functions are only temporary, and will be deleted when the full bin is set up. // These functions are only temporary, and will be deleted when the full bin is set up.
export const onTake = async (loanId) => { export const onTake = async (loanId) => {
const [items] = await pool.query( const [items] = await pool.query(
"SELECT loaned_items_id FROM loans WHERE id = ?", "SELECT loaned_items_id FROM loans WHERE id = ?",
@@ -405,6 +404,7 @@ export const onReturn = async (loanId) => {
} }
return { success: false }; return { success: false };
}; };
// Temporary functions end here.
export const loginAdmin = async (username, password) => { export const loginAdmin = async (username, password) => {
const [result] = await pool.query( const [result] = await pool.query(