From 4b31c34b5baf1f01176f8baf40ef668040f9ef37 Mon Sep 17 00:00:00 2001 From: mrPadre <51297778+mrPadre@users.noreply.github.com> Date: Mon, 3 Aug 2020 21:13:02 +0300 Subject: [PATCH] =?UTF-8?q?HM-97=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=88=D0=B8=D1=84=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BB=D1=8E=D1=87=D0=B0=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=85=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=BB=D0=B8=D1=89=D0=B0=20(#50)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/StorageServiceAPI.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/StorageServiceAPI.js b/src/api/StorageServiceAPI.js index 2800aa8..a93e168 100644 --- a/src/api/StorageServiceAPI.js +++ b/src/api/StorageServiceAPI.js @@ -38,7 +38,7 @@ class StorageServiceApi { * @returns {Promise} - Возвращает api по указанному ключу */ find = async (key) => { - const {data} = await http.get(`${this.URL}/${key}`, null, this.OPTIONS); + const {data} = await http.get(`${this.URL}/${encodeURIComponent(key)}`, null, this.OPTIONS); return data; } @@ -68,7 +68,7 @@ class StorageServiceApi { * @returns {Promise} - Возвращает удаленный элемент */ remove = async (key) => { - const {data} = await http.delete(`${this.URL}/${key}`, null, this.OPTIONS); + const {data} = await http.delete(`${this.URL}/${encodeURIComponent(key)}`, null, this.OPTIONS); return data; } }