Začištění kódu
This commit is contained in:
		
							parent
							
								
									d41e0e9113
								
							
						
					
					
						commit
						e78f9cfd3a
					
				@ -5,7 +5,6 @@ import cors from 'cors';
 | 
			
		||||
import { addChoice, addPizzaOrder, createPizzaDay, deletePizzaDay, finishPizzaDelivery, finishPizzaOrder, getData, getPizzaList, getRestaurantMenu, lockPizzaDay, removeChoice, removeChoices, removePizzaOrder, savePizzaList, unlockPizzaDay, updateDepartureTime, updateNote } from "./service";
 | 
			
		||||
import dotenv from 'dotenv';
 | 
			
		||||
import path from 'path';
 | 
			
		||||
import { getMenuSladovnicka, getMenuTechTower, getMenuUMotliku } from "./restaurants";
 | 
			
		||||
import { getQr } from "./qr";
 | 
			
		||||
import { generateToken, getLogin, getTrusted, verify } from "./auth";
 | 
			
		||||
import { Food, Locations, Restaurants } from "../../types";
 | 
			
		||||
 | 
			
		||||
@ -68,12 +68,10 @@ export async function getRestaurantMenu(restaurant: Restaurants, date?: Date, mo
 | 
			
		||||
        storage.setData(today, clientData);
 | 
			
		||||
    }
 | 
			
		||||
    if (!clientData?.menus?.[restaurant]) {
 | 
			
		||||
        if (!clientData.menus[restaurant]) {
 | 
			
		||||
            clientData.menus[restaurant] = {
 | 
			
		||||
                lastUpdate: getHumanTime(new Date()),
 | 
			
		||||
                food: [],
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
        clientData.menus[restaurant] = {
 | 
			
		||||
            lastUpdate: getHumanTime(new Date()),
 | 
			
		||||
            food: [],
 | 
			
		||||
        };
 | 
			
		||||
        switch (restaurant) {
 | 
			
		||||
            case Restaurants.SLADOVNICKA:
 | 
			
		||||
                clientData.menus[restaurant].food = await getMenuSladovnicka(date, mock);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user