HM-97 Добавил шифрование ключа при удалении хранилища (#50)

This commit is contained in:
mrPadre
2020-08-03 21:13:02 +03:00
committed by GitHub
parent a754cc1d89
commit 4b31c34b5b

View File

@ -38,7 +38,7 @@ class StorageServiceApi {
* @returns {Promise<Store>} - Возвращает api по указанному ключу * @returns {Promise<Store>} - Возвращает api по указанному ключу
*/ */
find = async (key) => { 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; return data;
} }
@ -68,7 +68,7 @@ class StorageServiceApi {
* @returns {Promise<Store>} - Возвращает удаленный элемент * @returns {Promise<Store>} - Возвращает удаленный элемент
*/ */
remove = async (key) => { 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; return data;
} }
} }