Variables for the API have been updated
This commit is contained in:
		| @@ -1,2 +1,3 @@ | ||||
| VUE_APP_TITLE=kamilcraft.com | ||||
| BASE_URL=http://127.0.0.1 | ||||
| VUE_APP_BASE_URL=http://127.0.0.1 | ||||
| VUE_APP_API_URL=https://api.kamilcraft.com | ||||
|   | ||||
| @@ -6,7 +6,7 @@ | ||||
|     <meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||||
|     <link rel="preconnect" href="https://fonts.googleapis.com"> | ||||
|     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||||
|     <link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||||
|     <link rel="icon" href="<%= VUE_APP_BASE_URL %>/favicon.ico"> | ||||
|     <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;400;700&display=swap" rel="stylesheet"> | ||||
|     <link href="https://fonts.googleapis.com/css2?family=Thasadith&display=swap" rel="stylesheet"> | ||||
|     <title>KamilCraft.com</title> | ||||
|   | ||||
| @@ -172,7 +172,7 @@ export default { | ||||
|         } | ||||
|       ], | ||||
|       clicked: false, | ||||
|       publicPath: process.env.BASE_URL | ||||
|       publicPath: process.env.VUE_APP_BASE_URL + '/' | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|   | ||||
| @@ -128,7 +128,7 @@ import BaseButton from '../BaseButton' | ||||
| export default { | ||||
|   data () { | ||||
|     return { | ||||
|       publicPath: process.env.BASE_URL | ||||
|       publicPath: process.env.VUE_APP_BASE_URL + '/' | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|   | ||||
| @@ -22,7 +22,7 @@ export default { | ||||
|   name: 'FavoriteProjects', | ||||
|   data () { | ||||
|     return { | ||||
|       publicPath: process.env.BASE_URL, | ||||
|       publicPath: process.env.VUE_APP_BASE_URL + '/', | ||||
|       select_projects: [] | ||||
|     } | ||||
|   }, | ||||
| @@ -31,7 +31,7 @@ export default { | ||||
|   }, | ||||
|   methods: { | ||||
|     loadProjectList () { | ||||
|       fetch('https://api.kamilcraft.com/projects/category/selected') | ||||
|       fetch(process.env.VUE_APP_API_URL + '/projects/category/selected') | ||||
|         .then(response => response.json()) | ||||
|         .then(data => { | ||||
|           this.select_projects = data | ||||
|   | ||||
| @@ -64,13 +64,16 @@ const routes = [ | ||||
|   { | ||||
|     path: '*', | ||||
|     name: '404', | ||||
|     meta: { | ||||
|       title: 'Błąd 404' | ||||
|     }, | ||||
|     component: NotFound | ||||
|   } | ||||
| ] | ||||
|  | ||||
| const router = new VueRouter({ | ||||
|   mode: 'history', | ||||
|   base: process.env.BASE_URL ?? '/', | ||||
|   base: '/', | ||||
|   routes, | ||||
|   scrollBehavior (to, from, savedPosition) { | ||||
|     if (savedPosition) { | ||||
|   | ||||
| @@ -25,7 +25,7 @@ const moduleSettings = { | ||||
|   }, | ||||
|   actions: { | ||||
|     fetchProjects (store) { | ||||
|       return fetch('https://api.kamilcraft.com/projects') | ||||
|       return fetch(process.env.VUE_APP_API_URL + '/projects') | ||||
|         .then(response => response.json()) | ||||
|         .then(data => { | ||||
|           store.commit('setProjects', data) | ||||
| @@ -33,7 +33,7 @@ const moduleSettings = { | ||||
|         }) | ||||
|     }, | ||||
|     fetchCategories (store) { | ||||
|       return fetch('https://api.kamilcraft.com/categories') | ||||
|       return fetch(process.env.VUE_APP_API_URL + '/categories') | ||||
|         .then(response => response.json()) | ||||
|         .then(data => { | ||||
|           store.commit('setCategories', data) | ||||
|   | ||||
| @@ -63,7 +63,7 @@ export default { | ||||
|   name: 'About', | ||||
|   data () { | ||||
|     return { | ||||
|       publicPath: process.env.BASE_URL | ||||
|       publicPath: process.env.VUE_APP_BASE_URL + '/' | ||||
|     } | ||||
|   }, | ||||
|   mounted () { | ||||
|   | ||||
| @@ -15,7 +15,7 @@ export default { | ||||
|   name: 'Home', | ||||
|   data () { | ||||
|     return { | ||||
|       publicPath: process.env.BASE_URL, | ||||
|       publicPath: process.env.VUE_APP_BASE_URL + '/', | ||||
|       select_projects: [] | ||||
|     } | ||||
|   }, | ||||
|   | ||||
| @@ -102,7 +102,7 @@ export default { | ||||
|       categories: { | ||||
|         active: 'all' | ||||
|       }, | ||||
|       publicPath: process.env.BASE_URL, | ||||
|       publicPath: process.env.VUE_APP_BASE_URL + '/', | ||||
|       projects: [] | ||||
|     } | ||||
|   }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user