From 51342529af3fad2884babca4fc1cd73324d6c912 Mon Sep 17 00:00:00 2001 From: evdokimoww Date: Wed, 13 Apr 2022 11:52:38 +0300 Subject: [PATCH] [#1280] hexlet correction widget --- resources/js/correction.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/resources/js/correction.js b/resources/js/correction.js index 4288409ae..b6e4a205d 100644 --- a/resources/js/correction.js +++ b/resources/js/correction.js @@ -1,5 +1,4 @@ import { Modal } from 'bootstrap'; -import axios from 'axios'; const ctrlEnterHandler = (event) => { if (event.keyCode === 13 && event.ctrlKey) { @@ -20,18 +19,7 @@ const ctrlEnterHandler = (event) => { btn.addEventListener('click', async () => { const textarea = document.getElementById('correctionModalTextarea'); - console.log(textarea.value); - - try { - await axios.post('https://hexlet-correction.herokuapp.com/api/workspaces/Title/typos', {}, { - headers: { - 'Content-Type': 'application/json', - Authorization: 'Token e0b71e21-0bf8-49f3-a990-7d08bbe65170', - }, - }); - } catch (err) { - console.log(err.message); - } + console.log('selection: ', textarea.value); modal.hide(); });