diff --git a/src/front/src/components/testing/DetailCardTest.vue b/src/front/src/components/testing/DetailCardTest.vue index de1efe642..7716432b0 100644 --- a/src/front/src/components/testing/DetailCardTest.vue +++ b/src/front/src/components/testing/DetailCardTest.vue @@ -123,30 +123,7 @@ export default { return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`; }); - const deactivateOldTestings = async (testId) => { - try { - const testingResp = await axiosApiInstance.get(`/api/tests/testingview/?test_id=${testId}`); - const userTestings = testingResp.data; - - if (userTestings?.length > 1) { - const sortedTestings = [...userTestings].sort((a, b) => { - return new Date(b.completion_date) - new Date(a.completion_date); - }); - - for (let i = 1; i < sortedTestings.length; i++) { - await axiosApiInstance.delete(`/api/tests/testingview/`, { - data: { id: sortedTestings[i].id } - }); - } - } - } catch (error) { - console.error('Error deactivating old testings:', error); - } - }; - - const startTest = async () => { - await deactivateOldTestings(testId); - + const startTest = async () => { await getTestById(testId); testStarted.value = true;