feat: Select article list in sight
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| import { languageStore } from "@shared"; | ||||
| import { languageStore, Language } from "@shared"; | ||||
| import axios from "axios"; | ||||
|  | ||||
| const authInstance = axios.create({ | ||||
| @@ -11,4 +11,16 @@ authInstance.interceptors.request.use((config) => { | ||||
|   return config; | ||||
| }); | ||||
|  | ||||
| export { authInstance }; | ||||
| const languageInstance = (language: Language) => { | ||||
|   const instance = axios.create({ | ||||
|     baseURL: "https://wn.krbl.ru", | ||||
|   }); | ||||
|   instance.interceptors.request.use((config) => { | ||||
|     config.headers.Authorization = `Bearer ${localStorage.getItem("token")}`; | ||||
|     config.headers["X-Language"] = language; | ||||
|     return config; | ||||
|   }); | ||||
|   return instance; | ||||
| }; | ||||
|  | ||||
| export { authInstance, languageInstance }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user