token-check-fix

This commit is contained in:
Untone 2024-03-04 19:12:23 +03:00
parent 36eb3e397c
commit 311a95ed97

View File

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