Compare commits
2 Commits
e7deba52e9
...
8517e9824c
| Author | SHA1 | Date | |
|---|---|---|---|
| 8517e9824c | |||
| 6cec8ff31d |
@ -331,7 +331,7 @@ public class MembreService {
|
|||||||
return update(repository.findById(id)
|
return update(repository.findById(id)
|
||||||
.call(__ -> repository.count("email LIKE ?1 AND id != ?2", membre.getEmail(), id)
|
.call(__ -> repository.count("email LIKE ?1 AND id != ?2", membre.getEmail(), id)
|
||||||
.invoke(Unchecked.consumer(c -> {
|
.invoke(Unchecked.consumer(c -> {
|
||||||
if (c > 0)
|
if (c > 0 && !membre.getEmail().isBlank())
|
||||||
throw new DBadRequestException("Email déjà utiliser");
|
throw new DBadRequestException("Email déjà utiliser");
|
||||||
})))
|
})))
|
||||||
.chain(membreModel -> clubRepository.findById(membre.getClub())
|
.chain(membreModel -> clubRepository.findById(membre.getClub())
|
||||||
@ -353,7 +353,7 @@ public class MembreService {
|
|||||||
return update(repository.findById(id)
|
return update(repository.findById(id)
|
||||||
.call(__ -> repository.count("email LIKE ?1 AND id != ?2", membre.getEmail(), id)
|
.call(__ -> repository.count("email LIKE ?1 AND id != ?2", membre.getEmail(), id)
|
||||||
.invoke(Unchecked.consumer(c -> {
|
.invoke(Unchecked.consumer(c -> {
|
||||||
if (c > 0)
|
if (c > 0 && !membre.getEmail().isBlank())
|
||||||
throw new DBadRequestException("Email déjà utiliser");
|
throw new DBadRequestException("Email déjà utiliser");
|
||||||
})))
|
})))
|
||||||
.invoke(Unchecked.consumer(membreModel -> {
|
.invoke(Unchecked.consumer(membreModel -> {
|
||||||
|
|||||||
@ -9,8 +9,11 @@ export function check_validity(online_callback = () => {
|
|||||||
axios.get(`${vite_url}/api/auth/userinfo`).then(data => {
|
axios.get(`${vite_url}/api/auth/userinfo`).then(data => {
|
||||||
online_callback({state: true, userinfo: data.data});
|
online_callback({state: true, userinfo: data.data});
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
online_callback({state: false});
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
console.log("=> Not authenticated");
|
||||||
online_callback({state: false});
|
online_callback({state: false});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user