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 107
107
document . getElementById ( 'loggedInContent' ) . style . display = 'block' ;
108
108
document . getElementById ( 'welcomeMessage' ) . textContent = `Welcome to your account, ${ username } !` ;
109
109
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 } ` ) ;
111
111
if ( ! res . ok ) throw new Error ( 'Failed to fetch data' ) ;
112
112
113
113
const data = await res . json ( ) ;
114
114
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>
117
117
` ;
118
118
} else {
119
119
await checkAuth ( ) ;
You can’t perform that action at this time.
0 commit comments