Commit 6a91e7bd authored by PDuarte's avatar PDuarte

release 1

parent 05b134f8
SKIP_PREFLIGHT_CHECK=true
REACT_APP_BASENAME= ""
REACT_APP_BASENAME= "/cms/"
REACT_APP_API2="http://192.168.99.100:8001/cms"
REACT_APP_API="http://134.209.18.22/cmsapi"
SKIP_PREFLIGHT_CHECK=true
REACT_APP_BASENAME= "/cms/"
REACT_APP_API2="http://192.168.99.100:8001/cms"
REACT_APP_API="http://134.209.18.22/cmsapi"
......@@ -28,6 +28,7 @@
"cleave.js": "1.6.0",
"draft-js": "0.11.7",
"draftjs-to-html": "0.9.1",
"env-cmd": "^10.1.0",
"file-saver": "2.0.2",
"flatpickr": "4.6.3",
"history": "5.0.0",
......@@ -91,7 +92,7 @@
},
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"build": "env-cmd -f .env.production react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-app-rewired eject",
"lint": "eslint src/**/*.js src/**/*.jsx",
......
// ** Auth Endpoints
export default {
loginEndpoint: 'http://192.168.99.100:8001/cms/api/login', ///'jwt/login', //
loginEndpoint: `${process.env.REACT_APP_API}/api/login`, ///'jwt/login', //
registerEndpoint: '/jwt/register',
refreshEndpoint: '/jwt/refresh-token',
logoutEndpoint: '/jwt/logout',
......
......@@ -98,7 +98,7 @@ export default class JwtService {
axios.defaults.withCredentials = true
// const cookie = Cookies.load('XSRF-TOKEN')
return axios.get('http://192.168.99.100:8001/cms/sanctum/csrf-cookie', {
return axios.get(`${process.env.REACT_APP_API}/sanctum/csrf-cookie`, {
withCredentials: true,
xsrfCookieName: "XSRF-TOKEN",
xsrfHeaderName: "X-XSRF-TOKEN"
......
......@@ -4,7 +4,7 @@ import axios from 'axios'
// ** Get table Data ///api/datatables/data
export const getData = params => {
return async dispatch => {
await axios.get('http://192.168.99.100:8001/cms/api/projects', params
await axios.get(`${process.env.REACT_APP_API}/api/projects`, params
).then(response => {
dispatch({
type: 'GET_DATA',
......@@ -42,7 +42,7 @@ export const setErrorMsg = params => {
// ** Get table Data ///api/datatables/data
export const getData_projects = params => {
return async dispatch => {
await axios.get('http://192.168.99.100:8001/cms/api/projects', params
await axios.get(`${process.env.REACT_APP_API}/api/projects`, params
).then(response => {
dispatch({
type: 'GET_DATA_PROJECTS',
......@@ -60,10 +60,10 @@ export const getData_projects = params => {
export const getProject = id => {
return async dispatch => {
await axios
.get(`http://192.168.99.100:8001/cms/api/projects/${id}`)
.get(`${process.env.REACT_APP_API}/api/projects/${id}`)
.then(response => {
console.log('leu')
console.log(response)
// console.log('leu')
// console.log(response)
dispatch({
type: 'GET_PROJECT',
selectedProject: response.data
......@@ -77,7 +77,7 @@ export const getProject = id => {
export const updateProject = project => {
return (dispatch, getState) => {
axios
.put(`http://192.168.99.100:8001/cms/api/projects/${project.id}`, project)
.put(`${process.env.REACT_APP_API}/api/projects/${project.id}`, project)
.then(response => {
dispatch({
type: 'UPDATE_PROJECT',
......@@ -100,7 +100,7 @@ export const updateProject = project => {
// ** Get table Data ///api/datatables/data
export const getData_platforms = params => {
return async dispatch => {
await axios.get('http://192.168.99.100:8001/cms/api/platforms', params
await axios.get(`${process.env.REACT_APP_API}/api/platforms`, params
).then(response => {
dispatch({
type: 'GET_DATA_PLATFORMS',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment