Преглед на файлове

fix(exam): resolve bug where position switching fails

sw преди 4 седмици
родител
ревизия
00254aaf98
променени са 1 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 5 3
      src/API/exam/changeBodyPosition.ts

+ 5 - 3
src/API/exam/changeBodyPosition.ts

@@ -1,11 +1,13 @@
 import axiosInstance from '../interceptor';
 
 export const changeBodyPosition = async (instanceUid: string) => {
-  const response = await axiosInstance.post(`auth/task/inspection/start`, {
+  const response = await axiosInstance.post(`/auth/task/inspection/start`, {
     instance_uid: instanceUid,
   });
-
-  if (response.data.code !== '0' && response.data.code !== '0x020101') {
+  console.log(
+    `Error code: ${response.data.code}, Description: ${response.data.description}`
+  );
+  if (response.data.code !== '0x000000' && response.data.code !== '0x020101') {
     throw new Error(
       `Error code: ${response.data.code}, Description: ${response.data.description}`
     );