diff --git a/src/class/api-service.js b/src/class/api-service.js index 4331a01..aeb118c 100644 --- a/src/class/api-service.js +++ b/src/class/api-service.js @@ -1,7 +1,7 @@ class ApiService{ constructor(){} - async get(id){ - const baseUrl = `https://jsonplaceholder.typicode.com/posts/${id}`;//edit + async get(link){ + const baseUrl = `${link}`;//edit const headers = { method: 'GET' }; @@ -10,8 +10,8 @@ class ApiService{ console.log(responseJson) } - async post(){ - const baseUrl = `https://jsonplaceholder.typicode.com/posts/`;//edit + async post(link){ + const baseUrl = `${link}`;//edit const headers = { method: 'POST', headers: {