From 9abf084530ba8b18710cd59bce6de50c3013c9d7 Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Thu, 2 Jul 2020 23:05:21 +0200 Subject: [PATCH] - Reworded api calls --- client/src/api/ingredientsRepository.js | 4 ++-- client/src/api/metaschoolsRepository.js | 4 ++-- client/src/api/variablesRepository.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/api/ingredientsRepository.js b/client/src/api/ingredientsRepository.js index fa4b013..1b51667 100644 --- a/client/src/api/ingredientsRepository.js +++ b/client/src/api/ingredientsRepository.js @@ -3,10 +3,10 @@ import api from './api' const resource = "/ingredients" export default { - getIngredients() { + getAll() { return api.get(`${resource}`) }, - getIngredient(id) { + getOne(id) { return api.get(`${resource}/${id}`) }, } \ No newline at end of file diff --git a/client/src/api/metaschoolsRepository.js b/client/src/api/metaschoolsRepository.js index 07aeb6b..1f4985d 100644 --- a/client/src/api/metaschoolsRepository.js +++ b/client/src/api/metaschoolsRepository.js @@ -3,10 +3,10 @@ import api from './api' const resource = "/meta_schools" export default { - getMetaSchools() { + getAll() { return api.get(`${resource}`) }, - getMetaSchool(id) { + getOne(id) { return api.get(`${resource}/${id}`) }, } \ No newline at end of file diff --git a/client/src/api/variablesRepository.js b/client/src/api/variablesRepository.js index 391a4f3..9cb9c1d 100644 --- a/client/src/api/variablesRepository.js +++ b/client/src/api/variablesRepository.js @@ -3,10 +3,10 @@ import api from './api' const resource = "/variables" export default { - getVariables() { + getAll() { return api.get(`${resource}`) }, - getVariable(id) { + getOne(id) { return api.get(`${resource}/${id}`) }, } \ No newline at end of file