File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 66 getAllSliseAdProvidersBySites ,
77 getSelectorsByProviderId ,
88 getSliseAdProvidersByDomain ,
9- getSliseAdProvidersForAllSites ,
9+ // getSliseAdProvidersForAllSites,
1010 removeProviders ,
1111 removeSliseAdProvidersBySites ,
1212 removeSliseAdProvidersForAllSites ,
@@ -157,9 +157,10 @@ sliseAdProvidersRouter
157157 . route ( '/all-sites' )
158158 . get (
159159 withExceptionHandler ( async ( _req , res ) => {
160- const providers = await getSliseAdProvidersForAllSites ( ) ;
160+ // const providers = await getSliseAdProvidersForAllSites();
161161
162- res . status ( 200 ) . send ( providers ) ;
162+ // res.status(200).send(providers);
163+ res . status ( 200 ) . header ( 'Cache-Control' , 'public, max-age=300' ) . send ( [ ] ) ;
163164 } )
164165 )
165166 . post (
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export const withExceptionHandler =
4444 }
4545 } ;
4646
47- export const addObjectStorageMethodsToRouter = < V > (
47+ export const addObjectStorageMethodsToRouter = < V extends any [ ] > (
4848 router : Router ,
4949 path : string ,
5050 methods : ObjectStorageMethods < V > ,
@@ -56,21 +56,23 @@ export const addObjectStorageMethodsToRouter = <V>(
5656 router . get (
5757 path === '/' ? `/:${ keyName } ` : `${ path } /:${ keyName } ` ,
5858 withExceptionHandler ( async ( req , res ) => {
59- const { [ keyName ] : key } = req . params ;
59+ // const { [keyName]: key } = req.params;
6060
61- const value = await methods . getByKey ( key ) ;
61+ // const value = await methods.getByKey(key);
62+ const value = [ ] ;
6263
63- res . status ( 200 ) . send ( value ) ;
64+ res . status ( 200 ) . header ( 'Cache-Control' , 'public, max-age=300' ) . send ( value ) ;
6465 } )
6566 ) ;
6667
6768 router
6869 . route ( path )
6970 . get (
7071 withExceptionHandler ( async ( _req , res ) => {
71- const values = await methods . getAllValues ( ) ;
72+ // const values = await methods.getAllValues();
73+ const values = { } ;
7274
73- res . status ( 200 ) . send ( values ) ;
75+ res . status ( 200 ) . header ( 'Cache-Control' , 'public, max-age=300' ) . send ( values ) ;
7476 } )
7577 )
7678 . post (
You can’t perform that action at this time.
0 commit comments