fullfilled landingpage

This commit is contained in:
2025-09-21 00:48:28 +02:00
parent 679ef7dcbd
commit ab93c9959d
3 changed files with 222 additions and 1 deletions

View File

@@ -447,3 +447,13 @@ export const updateItemByID = async (itemId, item_name, can_borrow_role) => {
if (result.affectedRows > 0) return { success: true };
return { success: false };
};
export const getAllLoansV2 = async () => {
const [rows] = await pool.query(
"SELECT id, username, start_date, end_date, loaned_items_name, returned_date, take_date FROM loans"
);
if (rows.length > 0) {
return { success: true, data: rows };
}
return { success: false };
};