[release] v0.10.0-unstable31

This commit is contained in:
Yann Stepienik 2023-10-07 14:53:20 +01:00
parent c779d47537
commit 4436a56297
2 changed files with 6 additions and 11 deletions

View file

@ -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
};
} }
} }

View file

@ -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": {