import axios from "axios";

// helper functions for fetching, updating and deleting signs

axios.defaults.withCredentials = true;

export async function fetchSigns() {
  return await axios.get("http://localhost:8000/signs/").then((res) => {
    return res.data;
  });
}

export async function deleteSign(sign_id) {
  return await axios.delete("http://localhost:8000/signs/" + sign_id);
}

export async function postSign(sign) {
  return await axios.post("http://localhost:8000/signs/", sign);
}
