enhance dashboard and user interface: update heading sizes, translate user label to German, and implement loan management features including fetching and displaying loans with error handling
This commit is contained in:
@@ -358,3 +358,9 @@ export const createUser = async (username, role, password) => {
|
||||
if (result.affectedRows > 0) return { success: true };
|
||||
return { success: false };
|
||||
};
|
||||
|
||||
export const getAllLoans = async () => {
|
||||
const [result] = await pool.query("SELECT * FROM loans");
|
||||
if (result.length > 0) return { success: true, data: result };
|
||||
return { success: false };
|
||||
};
|
||||
|
Reference in New Issue
Block a user