Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.20.0 #107

Merged
merged 21 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# v1.20.0
## New
- Added utensils
- Added more actions to cocktail collections list
- Added garnish info to cocktail print layout

## Fixes
- Improved mapping cocktail method when importing cocktails

# v1.19.0
## New
- Added share shopping list in markdown format
Expand Down
34 changes: 34 additions & 0 deletions src/ApiRequests.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,40 @@ class ApiRequests

return this.parseResponse(jsonResp);
}

/**
* =============================
* Utensils
* =============================
*/

static async fetchUtensils() {
let jsonResp = await this.getRequest(`/api/utensils`);

return this.parseResponse(jsonResp);
}

static async fetchUtensil(id) {
let jsonResp = await this.getRequest(`/api/utensils/${id}`);

return this.parseResponse(jsonResp);
}

static async saveUtensil(data) {
let jsonResp = await this.postRequest(`/api/utensils`, data);

return this.parseResponse(jsonResp);
}

static async updateUtensil(id, data) {
let jsonResp = await this.postRequest(`/api/utensils/${id}`, data, 'PUT');

return this.parseResponse(jsonResp);
}

static async deleteUtensil(id) {
return await this.deleteRequest(`/api/utensils/${id}`);
}
}

export default ApiRequests;
Loading
Loading