Add sponsor price endpoint and fetch pricing from backend on frontend
Made-with: Cursor
This commit is contained in:
@@ -9,6 +9,11 @@ const router = Router();
|
||||
|
||||
const SNAP_DAYS = [1, 3, 7, 14, 30, 60, 90, 180, 365];
|
||||
|
||||
/** Public endpoint: returns base sponsor price per day for display. */
|
||||
router.get("/price", (_req: Request, res: Response) => {
|
||||
res.json({ baseSponsorPricePerDay: config.baseSponsorPricePerDay });
|
||||
});
|
||||
|
||||
function snapDays(days: number): number {
|
||||
let best = SNAP_DAYS[0];
|
||||
for (const d of SNAP_DAYS) {
|
||||
|
||||
Reference in New Issue
Block a user