File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ auctionsRouter.get(
7070 requireAuth ,
7171 async ( req : Request , res : Response ) => {
7272 try {
73- const bidsInfo = BidsService . getAuctionBids ( req . params . id ) ;
73+ const bidsInfo = await BidsService . getAuctionBids ( req . params . id ) ;
7474 return res . status ( 200 ) . json ( bidsInfo ) ;
7575 } catch ( error ) {
7676 console . error ( 'Error fetching auction bids:' , error ) ;
@@ -86,7 +86,7 @@ auctionsRouter.post(
8686 async ( req : Request , res : Response ) => {
8787 try {
8888 const validatedBody = createBidSchema . validateSync ( req . body ) ;
89- const bid = BidsService . createBid ( validatedBody ) ;
89+ const bid = await BidsService . createBid ( validatedBody ) ;
9090 // Use 201 when a POST request successfully creates a new resource on the server.
9191 return res . status ( 201 ) . json ( bid ) ;
9292 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments