import axios from "axios";
import { apiUrl } from "../config/urls";

axios.defaults.baseURL = apiUrl;

const responseBody = (response) => response.data;

const methods = {
  loadNotifications: (userId) =>
    axios.get(`/Notification/${userId}`).then(responseBody),
  readNotifications: (payload) =>
    axios.post("/Notification", payload).then(responseBody),
};

export default methods;
