File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,9 @@ function App() {
8
8
const handleRestCall = async ( ) => {
9
9
const temp = await getTemp ( ) ;
10
10
const imgRes = await fetch ( `http://sömi-weather.ch/api/get-the-star-wars-planets-mapping-for-the-current-temperature-completely-and-utterly-accurate?temp=${ temp } ` )
11
+ console . log ( imgRes ) ;
11
12
const imgJson = await imgRes . json ( ) ;
12
-
13
+ console . log ( imgJson ) ;
13
14
setPlanet ( imgJson ) ;
14
15
} ;
15
16
@@ -28,17 +29,23 @@ function App() {
28
29
}
29
30
)
30
31
} ) ;
32
+ console . log ( res ) ;
31
33
const json = await res . json ( ) ;
34
+ console . log ( json ) ;
32
35
const id = await json . id ;
36
+ console . log ( id ) ;
33
37
34
38
for ( let i = 0 ; i < 10 ; i ++ )
35
39
{
36
40
await delay ( 500 ) ;
37
41
try
38
42
{
39
43
const varRes = await fetch ( `http://xn--smi-weather-rfb.ch/moen/engine-rest/history/variable-instance?processInstanceId=${ id } &variableName=temp` )
44
+ console . log ( varRes ) ;
40
45
const varJson = await varRes . json ( ) ;
46
+ console . log ( varJson ) ;
41
47
const temp = varJson . value ;
48
+ console . log ( temp ) ;
42
49
43
50
return temp ;
44
51
}
You can’t perform that action at this time.
0 commit comments