在服务器端,我有这些代码登录:
return jsonify({'email': email, 'token': create_token(email, isAdmin, password)})
Run Code Online (Sandbox Code Playgroud)
在客户端,我需要代码来检查登录和isAdmin.
isLogged() {
if (localStorage.getItem('currentUser') &&
JSON.parse(localStorage.getItem('currentUser')).email) {
return true;
}
return false;
}
isAdmin(){
//???
}
Run Code Online (Sandbox Code Playgroud)
如何从令牌获取用户角色?
使用 java bigquery API 时是否可以使用标准 SQL 查询?我正在尝试执行查询,但它抛出
com.google.api.client.googleapis.json.GoogleJsonResponseException:400 错误请求“消息”:“11.3 - 11.56:无法识别的类型 FLOAT64”