Skip to content

Commit

Permalink
Merge pull request #107 from karlomikus/develop
Browse files Browse the repository at this point in the history
1.20.0
  • Loading branch information
karlomikus authored Aug 16, 2023
2 parents df78cf0 + e6203a2 commit f3abff0
Show file tree
Hide file tree
Showing 35 changed files with 627 additions and 1,308 deletions.
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

0 comments on commit f3abff0

Please sign in to comment.