This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install && cd app && npm install | |
up to date, audited 2 packages in 2s | |
found 0 vulnerabilities | |
npm WARN deprecated [email protected]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that. | |
npm WARN deprecated [email protected]: flatten is deprecated in favor of utility frameworks such as lodash. | |
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained | |
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained | |
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
truffle unbox drizzle | |
Starting unbox... | |
================= | |
✔ Preparing to download box | |
✔ Downloading | |
npm WARN deprecated [email protected]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that. | |
npm WARN deprecated [email protected]: flatten is deprecated in favor of utility frameworks such as lodash. | |
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios"; | |
import Cookies from "js-cookie"; | |
import TokenValidate from "./TokenValidate"; | |
//Request Interceptor | |
axios.interceptors.request.use( | |
async (config) => { | |
if (config.url.includes("/login")) return config; | |
if (config.url.includes("/refreshToken")) return config; | |
} | |
TokenValidate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios"; | |
import Cookies from "js-cookie"; | |
import jwt_decode from "jwt-decode"; | |
import moment from "moment"; | |
import { history } from "../index"; | |
const TokenValidate = async () => { | |
let access_token = Cookies.get("access"); | |
let refresh_token = localStorage.getItem("refresh_token"); | |
if (!refresh_token) return history.push("/logout"); |