mirror of
https://github.com/p-stream/providers.git
synced 2026-05-08 05:39:58 +00:00
fix febboxkey finding
This commit is contained in:
parent
43249191fc
commit
62a9597da7
1 changed files with 4 additions and 4 deletions
|
|
@ -5,10 +5,10 @@ import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
|
|||
const getUserToken = (): string | null => {
|
||||
try {
|
||||
if (typeof window === 'undefined') return null;
|
||||
const authData = window.localStorage.getItem('__MW::preferences');
|
||||
if (!authData) return null;
|
||||
const parsedAuth = JSON.parse(authData);
|
||||
return parsedAuth?.febboxKey || null;
|
||||
const prefData = window.localStorage.getItem('__MW::preferences');
|
||||
if (!prefData) return null;
|
||||
const parsedAuth = JSON.parse(prefData);
|
||||
return parsedAuth?.state?.febboxKey || null;
|
||||
} catch (e) {
|
||||
console.warn('Unable to access localStorage or parse auth data:', e);
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue