Move food item routes to user blueprint

Refactored food item related routes from app.py to application/user/routes.py under the user blueprint. Updated template and JS references to use the blueprint route names, improving code organization and modularity.
This commit is contained in:
2025-06-29 17:52:03 +02:00
parent a6f6cdf346
commit 1b79925b49
4 changed files with 54 additions and 66 deletions

View File

@@ -45,7 +45,7 @@
await codeReader.decodeFromVideoDevice(selectedDeviceId, videoElement, async (result, err) => {
if (result) {
const codeText = result.getText();
const baseURL = "{{url_for('food_item', barcode='0')}}"
const baseURL = "{{url_for('user.food_item', barcode='0')}}"
window.location.href = baseURL.replace("0", encodeURIComponent(codeText))
}
});