re-setup subproject kontor-vue

This commit is contained in:
2026-04-05 13:27:00 +02:00
parent b81a38e650
commit 781f6dd854
78 changed files with 1833 additions and 9304 deletions
+33
View File
@@ -0,0 +1,33 @@
import axios from "axios";
const API_URL = "http://localhost:8200/";
class AuthService {
login(user) {
return axios
.post(API_URL + "login", {
email: user.username,
password: user.password,
})
.then((response) => {
if (response.data.accessToken) {
localStorage.setItem("user", JSON.stringify(response.data));
}
return response.data;
});
}
logout() {
localStorage.removeItem("user");
}
register(user) {
return axios.post(API_URL + "signup", {
username: user.username,
email: user.email,
password: user.password,
});
}
}
export default new AuthService();