Skip to content

Commit

Permalink
fix prod calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
jho44 committed Aug 14, 2023
1 parent 4f842c3 commit 2796071
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
15 changes: 7 additions & 8 deletions src/lib/parse.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AvailabilityStatus, Pronoun } from '@prisma/client';
import type { PRONOUNS_ENUM } from './constants';
import { AvailabilityStatus } from '@prisma/client';
import { PRONOUNS, type PRONOUNS_ENUM } from './constants';

export function getAvailRangeParts(availRange: string | undefined, status: string) {
if (status === AvailabilityStatus.UNSPECIFIED || status === AvailabilityStatus.BUSY) return {};
Expand Down Expand Up @@ -52,14 +52,13 @@ export function getAvailRangeParts(availRange: string | undefined, status: strin
}

export function getObjectivePronoun(pronouns: PRONOUNS_ENUM) {
let objectivePronoun = Pronoun[pronouns].split('_')[2].toLowerCase();
const { SHE_HER_HERS, THEY_THEM_THEIRS, XE_XEM_XYRS, ZEZIE_HIR_HIRS } = Pronoun;
let objectivePronoun = PRONOUNS[pronouns].split(', ')[2].toLowerCase();
// turn from possessive noun to possessive adjective
switch (pronouns) {
case SHE_HER_HERS:
case THEY_THEM_THEIRS:
case XE_XEM_XYRS:
case ZEZIE_HIR_HIRS:
case 'SHE_HER_HERS':
case 'THEY_THEM_THEIRS':
case 'XE_XEM_XYRS':
case 'ZEZIE_HIR_HIRS':
objectivePronoun = objectivePronoun.slice(0, -1);
}
return objectivePronoun;
Expand Down
11 changes: 3 additions & 8 deletions src/lib/server/twilio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,9 @@ export const sendMsg = async (
console.error(err);
console.error('message create request parameters:');
console.error(createMessageRequest);
return new Response(
JSON.stringify({
message: err
}),
{
status: 500
}
);
throw error(500, {
message: 'There was a problem sending you a magic link'
})
}

// It's a security issue to share the auth link with the client
Expand Down

0 comments on commit 2796071

Please sign in to comment.