changeBodyPosition.ts 444 B

123456789101112131415
  1. import axiosInstance from '../interceptor';
  2. export const changeBodyPosition = async (instanceUid: string) => {
  3. const response = await axiosInstance.post(`auth/task/inspection/start`, {
  4. instance_uid: instanceUid,
  5. });
  6. if (response.data.code !== '0' && response.data.code !== '0x020101') {
  7. throw new Error(
  8. `Error code: ${response.data.code}, Description: ${response.data.description}`
  9. );
  10. }
  11. return response.data;
  12. };