File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 107107 document . getElementById ( 'loggedInContent' ) . style . display = 'block' ;
108108 document . getElementById ( 'welcomeMessage' ) . textContent = `Welcome to your account, ${ username } !` ;
109109
110- const res = await fetch ( `https://scratchgems.onrender.com /api/data/ ${ username } ` ) ;
110+ const res = await fetch ( `https://scratch-coding-hut.github.io /api/orders?username= ${ username } ` ) ;
111111 if ( ! res . ok ) throw new Error ( 'Failed to fetch data' ) ;
112112
113113 const data = await res . json ( ) ;
114114 document . getElementById ( 'mainText' ) . innerHTML = `
115- <p>Pending Orders: ${ data . pendingorders } </p>
116- <p>Completed Orders: ${ data . completedorders } </p>
115+ <p>Pending Orders: ${ data . pending - orders } </p>
116+ <p>Completed Orders: ${ data . completed - orders } </p>
117117 ` ;
118118 } else {
119119 await checkAuth ( ) ;
You can’t perform that action at this time.
0 commit comments