Commit 6a91e7bd authored by PDuarte's avatar PDuarte

release 1

parent 05b134f8
SKIP_PREFLIGHT_CHECK=true 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 @@ ...@@ -28,6 +28,7 @@
"cleave.js": "1.6.0", "cleave.js": "1.6.0",
"draft-js": "0.11.7", "draft-js": "0.11.7",
"draftjs-to-html": "0.9.1", "draftjs-to-html": "0.9.1",
"env-cmd": "^10.1.0",
"file-saver": "2.0.2", "file-saver": "2.0.2",
"flatpickr": "4.6.3", "flatpickr": "4.6.3",
"history": "5.0.0", "history": "5.0.0",
...@@ -91,7 +92,7 @@ ...@@ -91,7 +92,7 @@
}, },
"scripts": { "scripts": {
"start": "react-app-rewired start", "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", "test": "react-app-rewired test",
"eject": "react-app-rewired eject", "eject": "react-app-rewired eject",
"lint": "eslint src/**/*.js src/**/*.jsx", "lint": "eslint src/**/*.js src/**/*.jsx",
......
// ** Auth Endpoints // ** Auth Endpoints
export default { 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', registerEndpoint: '/jwt/register',
refreshEndpoint: '/jwt/refresh-token', refreshEndpoint: '/jwt/refresh-token',
logoutEndpoint: '/jwt/logout', logoutEndpoint: '/jwt/logout',
......
...@@ -98,7 +98,7 @@ export default class JwtService { ...@@ -98,7 +98,7 @@ export default class JwtService {
axios.defaults.withCredentials = true axios.defaults.withCredentials = true
// const cookie = Cookies.load('XSRF-TOKEN') // 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, withCredentials: true,
xsrfCookieName: "XSRF-TOKEN", xsrfCookieName: "XSRF-TOKEN",
xsrfHeaderName: "X-XSRF-TOKEN" xsrfHeaderName: "X-XSRF-TOKEN"
......
...@@ -4,7 +4,7 @@ import axios from 'axios' ...@@ -4,7 +4,7 @@ import axios from 'axios'
// ** Get table Data ///api/datatables/data // ** Get table Data ///api/datatables/data
export const getData = params => { export const getData = params => {
return async dispatch => { 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 => { ).then(response => {
dispatch({ dispatch({
type: 'GET_DATA', type: 'GET_DATA',
...@@ -42,7 +42,7 @@ export const setErrorMsg = params => { ...@@ -42,7 +42,7 @@ export const setErrorMsg = params => {
// ** Get table Data ///api/datatables/data // ** Get table Data ///api/datatables/data
export const getData_projects = params => { export const getData_projects = params => {
return async dispatch => { 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 => { ).then(response => {
dispatch({ dispatch({
type: 'GET_DATA_PROJECTS', type: 'GET_DATA_PROJECTS',
...@@ -60,10 +60,10 @@ export const getData_projects = params => { ...@@ -60,10 +60,10 @@ export const getData_projects = params => {
export const getProject = id => { export const getProject = id => {
return async dispatch => { return async dispatch => {
await axios await axios
.get(`http://192.168.99.100:8001/cms/api/projects/${id}`) .get(`${process.env.REACT_APP_API}/api/projects/${id}`)
.then(response => { .then(response => {
console.log('leu') // console.log('leu')
console.log(response) // console.log(response)
dispatch({ dispatch({
type: 'GET_PROJECT', type: 'GET_PROJECT',
selectedProject: response.data selectedProject: response.data
...@@ -77,7 +77,7 @@ export const getProject = id => { ...@@ -77,7 +77,7 @@ export const getProject = id => {
export const updateProject = project => { export const updateProject = project => {
return (dispatch, getState) => { return (dispatch, getState) => {
axios 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 => { .then(response => {
dispatch({ dispatch({
type: 'UPDATE_PROJECT', type: 'UPDATE_PROJECT',
...@@ -100,7 +100,7 @@ export const updateProject = project => { ...@@ -100,7 +100,7 @@ export const updateProject = project => {
// ** Get table Data ///api/datatables/data // ** Get table Data ///api/datatables/data
export const getData_platforms = params => { export const getData_platforms = params => {
return async dispatch => { 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 => { ).then(response => {
dispatch({ dispatch({
type: 'GET_DATA_PLATFORMS', 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