добавлены события

This commit is contained in:
Kayashov.SM
2025-08-26 01:19:27 +04:00
parent fc6c60ad0c
commit 13fd6b176a
13 changed files with 172 additions and 23 deletions

View File

@@ -196,6 +196,12 @@ class CocktailClient {
}).catch(() => createError("Ошибка сохранения"))
}
drinkCocktail(id, createSuccess, createError) {
api().post(`${requests.cocktails.drink}/${id}`)
.then(() => createSuccess("Бон аппетит"))
.catch(() => createError("Ошибка отметки коктейля"))
}
}
export const cocktailClient = new CocktailClient();