integrate kontor-angular
This commit is contained in:
@@ -5,12 +5,12 @@ const API_URL = "http://localhost:8200/";
|
||||
class AuthService {
|
||||
login(user) {
|
||||
return axios
|
||||
.post(API_URL + "login", {
|
||||
email: user.username,
|
||||
.post(API_URL + "api/login/token", {
|
||||
username: user.username,
|
||||
password: user.password,
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.data.accessToken) {
|
||||
if (response.data.access_token) {
|
||||
localStorage.setItem("user", JSON.stringify(response.data));
|
||||
}
|
||||
return response.data;
|
||||
|
||||
Reference in New Issue
Block a user