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
6 changes: 3 additions & 3 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ app.use(
if(
corsEnv !== 'production'
&& (
/^https?:\/\/localhost(:\d*)?$/.test(origin) ||
/^https:\/\/.+\.local\.mrstache\.io$/.test(origin)
/^https:\/\/(.+\.)?localhost(:\d*)?$/.test(origin) ||
/^https:\/\/.+\.local\.mrstache\.io(:\d*)?$/.test(origin)
)
) {
return origin;
Expand All @@ -121,7 +121,7 @@ app.use(
const origin = ctx.get('origin');

// Accept dev origins only in non-production environments
if(corsEnv !== 'production' && /^https?:\/\/localhost(:\d*)?$/.test(origin)) {
if(corsEnv !== 'production' && /^https:\/\/(.+\.)?localhost(:\d*)?$/.test(origin)) {
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/routes/orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getTransactions } from '../services/transactions.js';

// TODO: make this configurable at some point
const EMAIL_LIST = '90392ecd5e',
EMAIL_TAG = 'Mustache Bash SF 2025 Attendee';
EMAIL_TAG = 'Mustache Bash 2026 Attendee';

const ordersRouter = new Router({
prefix: '/orders'
Expand Down
27 changes: 15 additions & 12 deletions lib/services/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ export function sendReceipt(guestFirstName, guestLastName, guestEmail, confirmat
mailgun.messages().send({
from: 'Mustache Bash Tickets <contact@mustachebash.com>',
to: guestFirstName + ' ' + guestLastName + ' <' + guestEmail + '> ',
subject: 'Your Tickets & Confirmation For San Francisco Mustache Bash 2025',
subject: 'Your Tickets & Confirmation For Mustache Bash 2026',
html: `
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>The Mustache Bash SF 2025 Confirmation</title>
<title>The Mustache Bash 2026 Confirmation</title>
<style>
@media only screen and (max-width: 620px) {
table[class=body] h1 {
Expand Down Expand Up @@ -136,7 +136,7 @@ table[class=body] .article {
<div class="content" style="box-sizing: border-box; display: block; margin: 0 auto; max-width: 580px; padding: 10px;">

<!-- START CENTERED WHITE CONTAINER -->
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">The Mustache Bash San Francisco - Tickets and Confirmation #${confirmation}. Thanks for ordering a Bash Pass!</span>
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">The Mustache Bash San Diego - Tickets and Confirmation #${confirmation}. Thanks for ordering a Bash Pass!</span>
<table role="presentation" class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background: #ffffff; border-radius: 3px; width: 100%;" width="100%">

<!-- START MAIN CONTENT AREA -->
Expand Down Expand Up @@ -164,13 +164,16 @@ table[class=body] .article {
<p style="font-family: sans-serif; font-size: 24px; font-weight: normal; margin: 0; margin-bottom: 15px;">
<strong><a style="color: #0e2245;" href="https://mustachebash.com/my-tickets?t=${orderToken}">VIEW TICKETS</a></strong>
</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">We're thrilled you're coming to the 2025 SF Mustache Bash! Keep this confirmation for your records, and on Bash day, bring your tickets linked above (note: printouts and screenshots WILL NOT be accepted) along with a valid photo ID for each guest to get in. Do not forward this email or ticket link to anyone.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">We're thrilled you're coming to the 2026 Mustache Bash! Keep this confirmation for your records, and on Bash day, bring your tickets linked above (note: printouts and screenshots WILL NOT be accepted) along with a valid photo ID for each guest to get in. Do not forward this email or ticket link to anyone.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Check out our <a href="https://mustachebash.com/info?utm_source=confirmation-email">FAQ page</a> for more info, and reply here or email us at <a href="mailto:contact@mustachebash.com">contact@mustachebash.com</a> if you have questions about your purchase.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Thanks again, we can’t wait to boogie with you.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 35px;">
Stay Funky,<br>
Team Mustache Bash
</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">
<span style="font-family: sans-serif; font-size: 14px; font-weight: bold;">PS</span>, if you're looking for somewhere to crash after the Bash, grab a discounted room at the <a href="https://be.synxis.com/?Hotel=64070&Chain=17551&arrive=2025-03-20&adult=1&promo=STACHE">Bahia</a>, <a href="https://res.windsurfercrs.com/ibe/details.aspx?propertyid=17116&nights=2&checkin=3/20/2026&group=MUSTACHEBASH26&lang=en-us&adults=2">Dana</a>, or <a href="https://www.hyatt.com/events/en-US/group-booking/SANIS/G-MUZ6">Hyatt</a> before they're all gone!
</p>
</td>
</tr>
</table>
Expand Down Expand Up @@ -210,14 +213,14 @@ export function sendUpgradeReceipt(customerFirstName: string, customerLastName:
mailgun.messages().send({
from: 'Mustache Bash Tickets <contact@mustachebash.com>',
to: customerFirstName + ' ' + customerLastName + ' <' + customerEmail + '> ',
subject: 'Your VIP Upgrade Confirmation For San Francisco Mustache Bash 2025',
subject: 'Your VIP Upgrade Confirmation For Mustache Bash 2026',
html: `
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>The Mustache Bash SF 2025 Confirmation</title>
<title>The Mustache Bash 2026 Confirmation</title>
<style>
@media only screen and (max-width: 620px) {
table[class=body] h1 {
Expand Down Expand Up @@ -292,7 +295,7 @@ table[class=body] .article {
<div class="content" style="box-sizing: border-box; display: block; margin: 0 auto; max-width: 580px; padding: 10px;">

<!-- START CENTERED WHITE CONTAINER -->
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">The Mustache Bash San Francisco - Tickets and Confirmation #${confirmation}. Thanks for ordering a Bash Pass!</span>
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">The Mustache Bash San Diego - Tickets and Confirmation #${confirmation}. Thanks for ordering a Bash Pass!</span>
<table role="presentation" class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background: #ffffff; border-radius: 3px; width: 100%;" width="100%">

<!-- START MAIN CONTENT AREA -->
Expand All @@ -318,7 +321,7 @@ table[class=body] .article {
<strong>Total:</strong> $${amount}
</p>

<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">We're thrilled you're coming to the 2025 SF Mustache Bash in VIP style! Use the ticket link in your original order to access your newly upgraded tickets.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">We're thrilled you're coming to the 2026 Mustache Bash in VIP style! Use the ticket link in your original order to access your newly upgraded tickets.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Check out our <a href="https://mustachebash.com/info?utm_source=confirmation-email">FAQ page</a> for more info, and reply here or email us at <a href="mailto:contact@mustachebash.com">contact@mustachebash.com</a> if you have questions about your purchase.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Thanks again, we can’t wait to boogie with you.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">
Expand Down Expand Up @@ -364,7 +367,7 @@ export function sendTransfereeConfirmation(transfereeFirstName, transfereeLastNa
mailgun.messages().send({
from: 'Mustache Bash Tickets <contact@mustachebash.com>',
to: transfereeFirstName + ' ' + transfereeLastName + ' <' + transfereeEmail + '> ',
subject: 'Your Tickets & Transfer Confirmation For San Francisco Mustache Bash 2025',
subject: 'Your Tickets & Transfer Confirmation For San Diego Mustache Bash 2026',
html: `
<!doctype html>
<html>
Expand Down Expand Up @@ -446,7 +449,7 @@ table[class=body] .article {
<div class="content" style="box-sizing: border-box; display: block; margin: 0 auto; max-width: 580px; padding: 10px;">

<!-- START CENTERED WHITE CONTAINER -->
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">The Mustache Bash San Francisco - Tickets and Confirmation #${parentOrderId.substring(0, 8)}. Thanks for ordering a Bash Pass!</span>
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">The Mustache Bash San Diego - Tickets and Confirmation #${parentOrderId.substring(0, 8)}. Thanks for ordering a Bash Pass!</span>
<table role="presentation" class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background: #ffffff; border-radius: 3px; width: 100%;" width="100%">

<!-- START MAIN CONTENT AREA -->
Expand All @@ -472,7 +475,7 @@ table[class=body] .article {
<p style="font-family: sans-serif; font-size: 18px; font-weight: normal; margin: 0; margin-bottom: 15px;">
<strong><a style="color: #0e2245;" href="https://mustachebash.com/my-tickets?t=${orderToken}">VIEW TICKETS</a></strong>
</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">We're thrilled you're coming to the 2025 SF Mustache Bash! Keep this confirmation for your records, and on Bash day, bring your tickets linked above (note: printouts and screenshots WILL NOT be accepted) along with a valid photo ID for each guest to get in. Do not forward this email or ticket link to anyone.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">We're thrilled you're coming to the 2026 Mustache Bash! Keep this confirmation for your records, and on Bash day, bring your tickets linked above (note: printouts and screenshots WILL NOT be accepted) along with a valid photo ID for each guest to get in. Do not forward this email or ticket link to anyone.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Check out our <a href="https://mustachebash.com/info?utm_source=confirmation-email">FAQ page</a> for more info, and reply here or email us at <a href="mailto:contact@mustachebash.com">contact@mustachebash.com</a> if you have questions about your purchase.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Thanks again, we can’t wait to boogie with you.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">
Expand Down
Loading