Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
9 | headers: { 10 | Authorization: `Bearer ${token}`, > 11 | Content-type: "application/json" | ^ 12 | } 13 | }
headers: { Authorization: `Bearer ${token}`, "Content-type": "application/json" }
9 | headers: { 10 | Authorization: `Bearer ${token}`, > 11 | "Content-type": "application/json" | ^ 12 | } 13 | }
import axios from "axios"; import { removeOfficer, setAllOfficers } from "../store/officersReducer"; import { setMessage } from "../store/infoMessagesReducer"; import { setSingleOfficer, setSingleOfficerError } from "../store/singleOfficerReducer"; const headers = (token) =>{ headers: { Authorization: `Bearer ${token}`, "Content-type": "application/json" } }
const headers = (token) => ({ headers: { Authorization: `Bearer ${token}`, "Content-type": "application/json" } });