Fix 4 P1 and 2 P2 code review findings for FRE-4576
P1 fixes: - Fix import paths in background/index.ts (./ -> ../lib/) - Fix Promise-in-string bug in api-client.ts authenticate() - Add missing background/service_worker key to manifest - Copy HTML to public/ so Vite places them in dist P2 fixes: - Add notifications permission to manifest - Make showWarningNotification async with proper await Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -88,7 +88,8 @@ export class ShieldApiClient {
|
||||
|
||||
async authenticate(apiKey: string): Promise<{ userId: string; tier: SubscriptionTier } | null> {
|
||||
try {
|
||||
const response = await fetch(`${settingsManager.get().then(s => s.apiBaseUrl)}/extension/auth`, {
|
||||
const settings = await settingsManager.get();
|
||||
const response = await fetch(`${settings.apiBaseUrl}/extension/auth`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user