Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 15 additions & 3 deletions frontend/src/components/pricing/UpgradeDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -634,14 +634,26 @@ export default {
)
},
async init() {
// if (this.featureFlagsLoaded) {
if (!this.lifetimePrice || !this.monthlyPrice) {
await this.fetchPrice()
}
// }
},
async fetchPrice() {
const res = await get("/stripe/price?exp=" + this.pricingPageConversion)
let res;
// Mock stripe price results in development mode as the Stripe API won't be accessible
if (process.env.NODE_ENV === "development") {
res = {
lifetime: { id: "price_dev_lifetime", unit_amount: 9999, recurring: null },
monthly: { id: "price_dev_monthly", unit_amount: 999, recurring: { interval: "month" } },
yearly: { id: "price_dev_yearly", unit_amount: 7999, recurring: { interval: "year" } },
lifetimeStudent: { id: "price_dev_lifetime_student", unit_amount: 4999, recurring: null },
monthlyStudent: { id: "price_dev_monthly_student", unit_amount: 499, recurring: { interval: "month" } },
yearlyStudent: { id: "price_dev_yearly_student", unit_amount: 3999, recurring: { interval: "year" } },
}
} else {
res = await get("/stripe/price?exp=" + this.pricingPageConversion)
}

const {
lifetime,
monthly,
Expand Down
10 changes: 6 additions & 4 deletions server/routes/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,13 @@ func createEvent(c *gin.Context) {
var user *models.User
var ownerId primitive.ObjectID
if signedIn {
ownerId = utils.StringToObjectID(userId)
user = db.GetUserById(userId)
if user == nil {
signedIn = false
ownerId = primitive.NilObjectID
} else {
ownerId = utils.StringToObjectID(userId)
}
} else {
ownerId = primitive.NilObjectID
}
Expand Down Expand Up @@ -686,8 +691,6 @@ func getResponses(c *gin.Context) {
responsesMap[userId] = response
}



// Apply privacy logic based on blindAvailabilityEnabled
if !utils.Coalesce(event.BlindAvailabilityEnabled) {
// Blind availability is NOT enabled - return response as-is
Expand Down Expand Up @@ -1628,4 +1631,3 @@ func getResponsesMap(responses []models.EventResponse) map[string]*models.Respon
}
return result
}