import { DOCUMENT_LAST } from "react-native-digitcamera/src/Api/ApiUrls";
import status from "../Status";

export const getDocumentLast = async ({ body }) => {
  try {
    console.log("Service", DOCUMENT_LAST);
    const res = await fetch(DOCUMENT_LAST, {
      method: "POST",
      body: JSON.stringify(body),
    });
    const checkd = status.checkStatus(res);
    const json = await checkd.json();
    return json;
  } catch (err) {
    console.log("Document Last Error", err);
    throw new Error(err.message);
  }
};
