@@ -4,16 +4,16 @@ import Ajv from 'ajv';
44import addFormats from 'ajv-formats' ;
55import type { FEArticle } from '../frontend/feArticle' ;
66import type { FECricketMatchPage } from '../frontend/feCricketMatchPage' ;
7+ import type { FEFootballMatchInfoPage } from '../frontend/feFootballMatchInfoPage' ;
78import type { FEFootballMatchListPage } from '../frontend/feFootballMatchListPage' ;
8- import type { FEFootballMatchPage } from '../frontend/feFootballMatchPage' ;
99import type { FEFootballTablesPage } from '../frontend/feFootballTablesPage' ;
1010import type { FEFront } from '../frontend/feFront' ;
1111import type { FEHostedContent } from '../frontend/feHostedContent' ;
1212import type { FETagPage } from '../frontend/feTagPage' ;
1313import articleSchema from '../frontend/schemas/feArticle.json' ;
1414import cricketMatchPageSchema from '../frontend/schemas/feCricketMatchPage.json' ;
15+ import footballMatchInfoPageSchema from '../frontend/schemas/feFootballMatchInfoPage.json' ;
1516import footballMatchListPageSchema from '../frontend/schemas/feFootballMatchListPage.json' ;
16- import footballMatchPageSchema from '../frontend/schemas/feFootballMatchPage.json' ;
1717import footballTablesPageSchema from '../frontend/schemas/feFootballTablesPage.json' ;
1818import frontSchema from '../frontend/schemas/feFront.json' ;
1919import hostedContentSchema from '../frontend/schemas/feHostedContent.json' ;
@@ -55,8 +55,8 @@ const validateFootballTablesPage = ajv.compile<FEFootballTablesPage>(
5555const validateCricketMatchPage = ajv . compile < FECricketMatchPage > (
5656 cricketMatchPageSchema ,
5757) ;
58- const validateFootballMatchPage = ajv . compile < FEFootballMatchPage > (
59- footballMatchPageSchema ,
58+ const validateFootballMatchInfoPage = ajv . compile < FEFootballMatchInfoPage > (
59+ footballMatchInfoPageSchema ,
6060) ;
6161const validateHostedContent = ajv . compile < FEHostedContent > ( hostedContentSchema ) ;
6262
@@ -176,8 +176,8 @@ export const validateAsCricketMatchPageType = (
176176
177177export const validateAsFootballMatchPageType = (
178178 data : unknown ,
179- ) : FEFootballMatchPage => {
180- if ( validateFootballMatchPage ( data ) ) return data ;
179+ ) : FEFootballMatchInfoPage => {
180+ if ( validateFootballMatchInfoPage ( data ) ) return data ;
181181
182182 const url =
183183 isObject ( data ) && isObject ( data . config ) && isString ( data . config . pageId )
@@ -186,7 +186,7 @@ export const validateAsFootballMatchPageType = (
186186
187187 throw new TypeError (
188188 `Unable to validate request body for url ${ url } .\n
189- ${ JSON . stringify ( validateFootballMatchPage . errors , null , 2 ) } ` ,
189+ ${ JSON . stringify ( validateFootballMatchInfoPage . errors , null , 2 ) } ` ,
190190 ) ;
191191} ;
192192
0 commit comments