Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions src/SolarEclipse2024.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2466,7 +2466,7 @@ export default defineComponent({

this.searchOpen = this.smAndUp;

// this.createUserEntry();
this.createUserEntry();

// We just need to force these to get around some Safari issues whose cause is TBD
Planets._loadPlanetTextures();
Expand Down Expand Up @@ -3574,23 +3574,23 @@ export default defineComponent({
return;
}

let gaveRating = false;
if (userExists) {
const ratingResponse = await fetch(`${this.storyRatingUrl}/${this.uuid}`, {
method: "GET",
// eslint-disable-next-line @typescript-eslint/naming-convention
headers: { "Authorization": process.env.VUE_APP_CDS_API_KEY ?? "" }
});

const ratingContent = await ratingResponse.json();
gaveRating = ratingResponse.status === 200 && ratingContent.ratings?.length > 0;
}
// let gaveRating = false;
// if (userExists) {
// const ratingResponse = await fetch(`${this.storyRatingUrl}/${this.uuid}`, {
// method: "GET",
// // eslint-disable-next-line @typescript-eslint/naming-convention
// headers: { "Authorization": process.env.VUE_APP_CDS_API_KEY ?? "" }
// });

if (!gaveRating) {
this.questionTimeout = setTimeout(() => {
this.showRating = true;
}, 60_000);
}
// const ratingContent = await ratingResponse.json();
// gaveRating = ratingResponse.status === 200 && ratingContent.ratings?.length > 0;
// }
//
// if (!gaveRating) {
// this.questionTimeout = setTimeout(() => {
// this.showRating = true;
// }, 60_000);
// }
},

resetData() {
Expand Down
Loading