timetable-extension #1

Open
fred.boniface wants to merge 154 commits from timetable-extension into main
Showing only changes of commit 8e325339bf - Show all commits

View File

@ -21,7 +21,7 @@ func ConvertServiceType(input *upstreamApi.JsonScheduleV1, vstp bool) (*database
PlanSpeed: parseSpeed(&input.ScheduleSegment.CifSpeed),
ScheduleStartDate: ParseCifDate(&input.ScheduleStartDate, "start"),
ScheduleEndDate: ParseCifDate(&input.ScheduleEndDate, "end"),
ServiceDetail: generateServiceDetail(&input.ScheduleSegment.CifTrainClass, &input.ScheduleSegment.SignallingId, &input.ScheduleSegment.CifCateringCode, &input.ScheduleSegment.CifSleepers, &input.ScheduleSegment.CifOperatingCharacteristics, vstp),
ServiceDetail: generateServiceDetail(&input.ScheduleSegment.CifTrainClass, &input.ScheduleSegment.SignallingId, &input.ScheduleSegment.CifCateringCode, &input.ScheduleSegment.CifSleepers, vstp),
DaysRun: parseDaysRun(&input.ScheduleDaysRun),
Stops: parseStops(&input.ScheduleSegment.ScheduleLocation),
}
@ -85,8 +85,7 @@ func isPublic(input *upstreamApi.CifScheduleLocation) bool {
// Generates a ServiceDetail struct based on the input
func generateServiceDetail(
cifTrainClass, signallingId,
cateringCode, sleepers,
operatingCharacteristics *string,
cateringCode, sleepers *string,
vstp bool,
) database.ServiceDetail {
return database.ServiceDetail{