diff --git a/SWP391 b/SWP391 deleted file mode 160000 index 6587195..0000000 --- a/SWP391 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6587195c3105ae130ad1f9c7d9a5b7fad92f98b2 diff --git a/src/config/axios.js b/src/config/axios.js index 74e89ae..6b2911f 100644 --- a/src/config/axios.js +++ b/src/config/axios.js @@ -1,19 +1,19 @@ import axios from "axios"; const api = axios.create({ - baseURL: 'http://103.90.227.65:8080/api/' + baseURL: "http://localhost:8080/api/", }); //lam hanh dong truoc khi call api const handleBefore = (config) => { - const token = localStorage.getItem("token")?.replaceAll('"', ""); - config.headers["Authorization"] = `Bearer ${token}`; - return config; + const token = localStorage.getItem("token")?.replaceAll('"', ""); + config.headers["Authorization"] = `Bearer ${token}`; + return config; }; const handleError = (error) => { - console.log(error); + console.log(error); }; api.interceptors.request.use(handleBefore, handleError); -export default api; \ No newline at end of file +export default api; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 5427b59..21a3447 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,7 +1,7 @@ spring.application.name=SWP391 -spring.datasource.url=jdbc:mysql://103.90.227.65/koikichi +spring.datasource.url=jdbc:mysql://localhost:3306/koikichi spring.datasource.username=root -spring.datasource.password=SWP@123456 +spring.datasource.password=root spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect