Existing Routes - slickage/adness GitHub Wiki
API:
GET /api/auctions/time - get all time by time with bids
GET /api/auctions/open - get open auctions with bids
GET /api/auctions/closed - get closed auctions with bids
GET /api/auctions/future - get future auctions with bids
GET /api/auctions/past - get past auctions with bids
GET /api/auctions/:auctionId/bids - get given auction with all bids
GET /api/auctions/:auctionId - get given auction, with winning bids
GET /api/auctions - get all auctions, no bids
POST /api/auctions/enable/:auctionId - enable auction (admin auth needed)
POST /api/auctions/disable/:auctionId - disable auction (admin auth needed)
POST /api/auctions/edit - update the given auction (admin auth needed)
POST /api/auctions - create new auction (admin auth needed)
DELETE /api/auctions/:auctionId - delete a auction (admin auth needed)
GET /api/bids/:bidId - get given bid
POST /api/bids/edit - update the given bid (admin auth needed)
POST /api/bids - create bid for auction, auctionId in body (auth needed)
DELETE /api/bids/:bidId - delete a bid (admin auth needed)
GET /api/ads/:adId - get a specific ad
POST /api/ads/:adId - update an ad (auth needed)
POST /api/ads - create a new ad (auth needed)
DELETE /api/:adId - delete a given ad (auth needed)
POST /login - login user
POST /logout - logout user
Views:
GET /sb - index
GET /sb/history/ - All closed auctions view page
GET /sb/registration - registration view page
GET /sb/payment - user registration payment page
GET /sb/qr/:qrString - generate qr
GET /sb/auctions/:auctionId - auction details view page
POST /sb/auctions/enable/:auctionId - enable auction (admin auth needed)
POST /sb/auctions/disable/:auctionId - disable auction (admin auth needed)
POST /sb/auctions/edit - update given auction (admin auth needed)
POST /sb/auctions - create new auction (admin auth needed)
DELETE /sb/auctions/:auctionId - delete a auction (admin auth needed)
POST /sb/bids/edit - update given bid (admin auth needed)
DELETE /sb/bids/:bidId - delete a bid (admin auth needed)
POST /sb/bids/ - create new bid (auth needed)
GET /sb/users/:userId - get all ads for a user (auth needed)
GET /sb/ads/upload - view to create a new ad for current user (auth needed)
GET /sb/ads/:adId/edit - view to edit an ad (auth needed)
GET /sb/ads/:adId - view a given ad
POST /sb/ads/:adId/approve - approve an ad (admin auth needed)
POST /sb/ads/:adId/reject - reject an ad (admin auth needed)
POST /sb/ads/:adId/delete - delete an ad (auth needed)
POST /sb/ads/:adId - update a given ad (auth needed)
POST /sb/ads - create a new ad (auth needed)
DELETE /sb/ads/:adId - delete a given ad (auth needed)
GET /admin/auctions/edit/:auctionId - edit a auction (admin auth needed)
GET /admin - admin page (admin auth needed)
GET / - may not be used anymore