Skip to content

Commit

Permalink
fix: 401 error on favorites
Browse files Browse the repository at this point in the history
  • Loading branch information
brettski committed Nov 1, 2023
1 parent 0a31196 commit d380dbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "that-us",
"version": "3.15.1",
"version": "3.15.2",
"description": "THAT.us website",
"main": "index.js",
"type": "module",
Expand Down
12 changes: 4 additions & 8 deletions src/lib/stores/favorites.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,11 @@ export async function toggle(sessionId, eventId) {
return results;
}

async function create() {
const initalValues = await get();
favoritesStore.set(initalValues);
}

if (browser) {
page.subscribe((values) => {
if (values?.data?.user?.profile) {
create();
page.subscribe(async (values) => {
if (values?.data?.user?.isAuthenticated) {
const initalValues = await get();
favoritesStore.set(initalValues);
}
});
}
Expand Down

0 comments on commit d380dbc

Please sign in to comment.