Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use Lead Style from MP tick import instead of Style #1259

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions src/app/api/user/bulkImportTicks/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export interface Tick {
notes: string
climbId: string
userId: string | undefined
style: string
attemptType: string
style: string | null
attemptType: string | null
dateClimbed: Date
grade: string
source: string
Expand Down Expand Up @@ -99,8 +99,8 @@ const postHandler = async (req: NextRequest): Promise<any> => {
notes: tick.Notes,
climbId: tick.mp_id,
userId: uuid,
style: tick.Style === '' ? 'N/A' : tick.Style,
attemptType: tick.Style === '' ? 'N/A' : tick.Style,
style: tick.Style === '' ? null : tick.Style,
attemptType: tick['Lead Style'] === '' ? null : tick['Lead Style'],
dateClimbed: new Date(Date.parse(`${tick.Date}T00:00:00`)), // Date.parse without timezone specified converts date to user's present timezone.
grade: tick.Rating,
source: 'MP'
Expand Down
Loading