Formatting
authorAdam Dullage <redacted>
Fri, 13 Oct 2023 11:43:26 +0000 (12:43 +0100)
committerAdam Dullage <redacted>
Fri, 13 Oct 2023 11:43:26 +0000 (12:43 +0100)
flatnotes/src/api.js

index 0ab3a26ae66363495f8e3bf1f11d93ef6f9108ae..e7281aae52f3861d51463335e1bd33d1ffc41419 100644 (file)
@@ -6,23 +6,23 @@ import axios from "axios";
 const api = axios.create();
 
 api.interceptors.request.use(
-  function(config) {
+  function (config) {
     if (config.url !== "/api/token") {
       let token = sessionStorage.getItem("token");
       config.headers.Authorization = `Bearer ${token}`;
     }
     return config;
   },
-  function(error) {
+  function (error) {
     return Promise.reject(error);
   }
 );
 
 api.interceptors.response.use(
-  function(response) {
+  function (response) {
     return response;
   },
-  function(error) {
+  function (error) {
     if (
       typeof error.response !== "undefined" &&
       error.response.status === 401
git clone https://git.99rst.org/PROJECT