File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 11import { setProductsData } from "../redux/slices/mainSlice"
22import { store } from '../redux/store'
33
4-
5- // TODO: Replace with correct endpoint in the future
64export async function GetProductsService ( ) {
5+ await fetch (
6+ '/landsat/products' ,
7+ {
8+ method : 'GET'
9+ }
10+ )
11+ . then ( ( response ) => {
12+ return response . json
13+ } ) ;
714
815 // const allProductRequests = ALL_PROVIDERS.map(async provider => {
916 // return fetch('/api/products', {
Original file line number Diff line number Diff line change @@ -22,7 +22,15 @@ export default defineConfig({
2222 open : true ,
2323 hmr : {
2424 overlay : false
25- }
25+ } ,
26+ cors : false ,
27+ proxy : {
28+ '/landsat' : {
29+ target : 'https://qju8vxty89.execute-api.us-east-1.amazonaws.com' ,
30+ changeOrigin : true ,
31+ rewrite : ( path ) => path . replace ( / ^ \/ l a n d s a t / , '' ) ,
32+ } ,
33+ } ,
2634 } ,
2735 test : {
2836 globals : true ,
You can’t perform that action at this time.
0 commit comments