File tree Expand file tree Collapse file tree 5 files changed +16
-16
lines changed
Expand file tree Collapse file tree 5 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 11{
2- "lastUpdatedAt" : 1766390878596 ,
2+ "lastUpdatedAt" : 1766392018585 ,
33 "flights" : [
44 {
55 "id" : " 9724320d-7c38-4e65-9d14-5df975d7c820" ,
58615861 "arrGate" : null
58625862 }
58635863 ]
5864- }
5864+ }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { NextSeo as Metadata } from 'next-seo';
33
44import { Routes , siteMetadata } from 'config/constants' ;
55
6- import FlightsContentService from 'services/content/flights ' ;
6+ import FlightyService from 'services/providers/flighty ' ;
77
88import { MetadataConfig , generateOpenGraphImage } from 'utils/open-graph' ;
99
@@ -35,11 +35,11 @@ export type PageProps = InferGetStaticPropsType<typeof getStaticProps>;
3535// NEXT
3636// ---------------------------------------------------------------------------
3737
38- const flightsService = FlightsContentService . getInstance ( ) ;
38+ const flightsService = FlightyService . getInstance ( ) ;
3939
4040export async function getStaticProps ( ) {
4141 flightsService . init ( ) ;
42- await flightsService . generateFlightsData ( ) ;
42+ await flightsService . bootstrapLocalData ( ) ;
4343
4444 const flights = flightsService . getFlights ( ) ;
4545 const airlines = flightsService . getAirlines ( ) ;
Original file line number Diff line number Diff line change 11import { siteMetadata , socialNetworks } from 'config/constants' ;
22
3- import ForbesCurrencyConverter from 'services/providers/forbes-currency-converter ' ;
3+ import ForbesService from 'services/providers/forbes' ;
44
55import Badge from 'components/shared/badge' ;
66import ButtonLink from 'components/shared/button-link' ;
@@ -13,10 +13,10 @@ import Layout from 'components/layouts/page';
1313// NEXT
1414// ---------------------------------------------------------------------------
1515
16- const currencyServiceInstance = ForbesCurrencyConverter . getInstance ( ) ;
16+ const currencyServiceInstance = ForbesService . getInstance ( ) ;
1717
1818export async function getStaticProps ( ) {
19- await currencyServiceInstance . generateCurrencyTable ( ) ;
19+ await currencyServiceInstance . bootstrapLocalData ( ) ;
2020 return {
2121 props : { } ,
2222 } ;
Original file line number Diff line number Diff line change @@ -73,20 +73,20 @@ export type AirportCode = string;
7373// CORE
7474// ---------------------------------------------------------------------------
7575
76- export default class FlightsContentService {
77- private static instance : FlightsContentService ;
76+ export default class FlightyService {
77+ private static instance : FlightyService ;
7878 private flights : Flight [ ] = [ ] ;
7979
8080 private constructor ( ) { }
8181
82- public static getInstance ( ) : FlightsContentService {
83- if ( ! FlightsContentService . instance ) {
84- FlightsContentService . instance = new FlightsContentService ( ) ;
82+ public static getInstance ( ) : FlightyService {
83+ if ( ! FlightyService . instance ) {
84+ FlightyService . instance = new FlightyService ( ) ;
8585 }
86- return FlightsContentService . instance ;
86+ return FlightyService . instance ;
8787 }
8888
89- public async generateFlightsData ( ) {
89+ public async bootstrapLocalData ( ) {
9090 if ( isInCi ) {
9191 console . info ( 'Running in CI - skipping flights data generation' ) ;
9292 return null ;
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export default class ForbesCurrencyConverter {
8686 } ;
8787 }
8888
89- async generateCurrencyTable ( ) {
89+ async bootstrapLocalData ( ) {
9090 if ( isInCi ) {
9191 console . info ( 'Running in a CI environment' ) ;
9292 console . warn ( 'Skipping currency table generation' ) ;
You can’t perform that action at this time.
0 commit comments