소스 검색

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}`
     );