const host = "api/";

const routes = {
    auth: host + "auth/",
    bar: host + "bar/",
    category: host + "category",
    cocktail: host + "cocktail",
    glass: host + "glass",
    ingredient: host + "ingredient",
    receipt: host + "receipt",
    unit: host + "unit",
}

export const requests = {
    auth: {
        login: routes.auth + "login",
        refresh: routes.auth + "refresh",
        singOut: "signOut",
        getMe: routes.auth + "getMe",
    },
    bar: {
        crud: routes.bar,
        all: routes.bar + "all",
        change: routes.bar + "change",
    },
    category: {
        basic: routes.category,
    },
    cocktails: {
        menu: routes.cocktail + "/menu",
        calc: routes.cocktail + "/calc",
        byIngredient: routes.cocktail + "/byIngredient?id=",
        photo: routes.cocktail + "/photo",
        cocktail: routes.cocktail + "?id=",
        basic: routes.cocktail,
        simple: routes.cocktail + "/simple",
        modal: routes.cocktail + "/modal?id=",
        favourite: routes.cocktail + "/favourite?id=",
        rating: routes.cocktail + "/rating?id=",
        drink: routes.cocktail + "/drink",
        hide: routes.cocktail + "/hidden/",
    },
    glass: {
        list: routes.glass,
    },
    ingredient: {
        all: routes.ingredient + "/all",
        simple: routes.ingredient + "/simple",
        type: routes.ingredient + "/type",
        crud: routes.ingredient,
    },
    unit: routes.unit + "/units"
}