[release] v0.10.0-unstable31
This commit is contained in:
parent
c779d47537
commit
4436a56297
|
@ -3,16 +3,8 @@ import { useCookies } from 'react-cookie';
|
|||
import { logout } from '../api/authentication';
|
||||
|
||||
function useClientInfos() {
|
||||
const [cookies] = useCookies(['client-infos', 'jwttoken']);
|
||||
const [cookies] = useCookies(['client-infos']);
|
||||
|
||||
if(cookies['jwttoken'] === undefined) {
|
||||
// probably the demo or new install
|
||||
return {
|
||||
nickname: "",
|
||||
role: "2"
|
||||
}
|
||||
}
|
||||
|
||||
let clientInfos = null;
|
||||
|
||||
try {
|
||||
|
@ -25,7 +17,10 @@ function useClientInfos() {
|
|||
};
|
||||
} catch (error) {
|
||||
console.error('Error parsing client-infos cookie:', error);
|
||||
logout();
|
||||
return {
|
||||
nickname: "",
|
||||
role: 2
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.10.0-unstable30",
|
||||
"version": "0.10.0-unstable31",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
|
|
Loading…
Reference in a new issue