token-check-fix
This commit is contained in:
parent
36eb3e397c
commit
311a95ed97
|
@ -25,12 +25,14 @@ const server = Server.configure({
|
|||
const shout_id = parseInt(data.documentName.replace('shout-', ''), 10)
|
||||
console.debug(`shout_id extracted: ${shout_id}`);
|
||||
|
||||
const token = data.token || data.requestHeaders['authorization'] || ''
|
||||
|
||||
const params = {
|
||||
token_type: 'access_token',
|
||||
token: data.requestHeaders['authorization'] || '',
|
||||
token
|
||||
};
|
||||
|
||||
if (!params.token) {
|
||||
if (!token) {
|
||||
console.error('Authorization token not found');
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user