edited scheme but still not working

This commit is contained in:
2025-11-24 16:05:56 +01:00
parent cb6b5858e5
commit d64489aed4
3 changed files with 32 additions and 4 deletions

View File

@@ -114,3 +114,14 @@ export const getAllLoansV2 = async () => {
}
return { success: false };
};
export const openDoor = async (doorKey) => {
const [result] = await pool.query(
"SELECT lockers FROM doorKeys WHERE door_key = ?;",
[doorKey]
);
if (result.length > 0) {
return { success: true, data: result[0] };
}
return { success: false };
};