import axios from "axios";

// helper functions for fetching and updating settings

axios.defaults.withCredentials = true;

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

export async function updateSetting(settingID, data) {
  return await axios.patch(
    "http://localhost:8000/settings/" + settingID + "/",
    data
  );
}
