From 73878b421d97439abb4cad9ad356ef69e866ff19 Mon Sep 17 00:00:00 2001 From: Samidy Date: Fri, 6 Mar 2026 03:30:50 +0300 Subject: [PATCH] fix(community themes): fix not being able to upload community themes --- js/themeStore.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/themeStore.js b/js/themeStore.js index fae7d55..89ed5cd 100644 --- a/js/themeStore.js +++ b/js/themeStore.js @@ -111,7 +111,7 @@ export class ThemeStore { let currentUserId = null; if (authManager.user) { try { - const record = await syncManager._getUserRecord(authManager.user.uid); + const record = await syncManager._getUserRecord(authManager.user.$id); currentUserId = record?.id; } catch (e) { console.warn('Failed to resolve user ID for theme ownership check', e); @@ -233,7 +233,7 @@ export class ThemeStore { const fbUser = authManager.user; if (!fbUser) throw new Error('Not authenticated'); - await this.pb.collection('themes').delete(themeId, { f_id: fbUser.uid }); + await this.pb.collection('themes').delete(themeId, { f_id: fbUser.$id }); alert('Theme deleted successfully.'); this.loadThemes(); } catch (err) { @@ -518,7 +518,7 @@ export class ThemeStore { let userName = null; try { - const dbUser = await syncManager._getUserRecord(fbUser.uid); + const dbUser = await syncManager._getUserRecord(fbUser.$id); if (!dbUser) { throw new Error('Could not find or create your user record. Please try again.'); } @@ -547,11 +547,11 @@ export class ThemeStore { formData.append('authorUrl', website || ''); if (this.editingThemeId) { - await this.pb.collection('themes').update(this.editingThemeId, formData, { f_id: fbUser.uid }); + await this.pb.collection('themes').update(this.editingThemeId, formData, { f_id: fbUser.$id }); alert('Theme updated successfully!'); } else { formData.append('author', userId); - await this.pb.collection('themes').create(formData, { f_id: fbUser.uid }); + await this.pb.collection('themes').create(formData, { f_id: fbUser.$id }); alert('Theme uploaded successfully!'); }