[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';
|
import { logout } from '../api/authentication';
|
||||||
|
|
||||||
function useClientInfos() {
|
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;
|
let clientInfos = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -25,7 +17,10 @@ function useClientInfos() {
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error parsing client-infos cookie:', error);
|
console.error('Error parsing client-infos cookie:', error);
|
||||||
logout();
|
return {
|
||||||
|
nickname: "",
|
||||||
|
role: 2
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cosmos-server",
|
"name": "cosmos-server",
|
||||||
"version": "0.10.0-unstable30",
|
"version": "0.10.0-unstable31",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "test-server.js",
|
"main": "test-server.js",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|
Loading…
Reference in a new issue