Skip to content

Commit

Permalink
adjust function names
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulSut committed Jan 30, 2024
1 parent 1735df9 commit 448e82f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions p/db/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ const parseLineWithAdditionalName = ({parsed}, l) => {

// todo: sotRating, conSubscr, isSotCon, showARSLink, sotCtxt
// todo: conSubscr, showARSLink, useableTime
const addPrice = (parsed, raw) => {
const mutateToAddPrice = (parsed, raw) => {
parsed.price = null
// todo: find cheapest, find discounts
// todo: write a parser like vbb-parse-ticket
Expand Down Expand Up @@ -372,7 +372,7 @@ const isFirstClassTicket = (addData, opt) => {
}
};

const addTickets = (parsed, opt, j) => {
const mutateToAddTickets = (parsed, opt, j) => {
if (
j.trfRes &&
Array.isArray(j.trfRes.fareSetL)
Expand Down Expand Up @@ -419,8 +419,8 @@ const addTickets = (parsed, opt, j) => {
}

const parseJourneyWithPriceAndTickets = ({parsed, opt}, raw) => {
addPrice(parsed, raw)
addTickets(parsed, opt, raw)
mutateToAddPrice(parsed, raw)
mutateToAddTickets(parsed, opt, raw)
return parsed
}

Expand Down

0 comments on commit 448e82f

Please sign in to comment.