[TSM.ID].[11031972] PXE : Platform X Ecosystem I [118 Module -LIVE-]

This commit is contained in:
TSM.ID
2026-05-25 03:50:05 +07:00
commit e820143b3c
673 changed files with 101320 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
import Redis from 'ioredis';
export const redis = new Redis(process.env.REDIS_URL || 'redis://localhost:6379');
export async function getExchangeRate() {
const cache = await redis.get('usd_idr_rate');
if (cache) return parseFloat(cache);
const rate = 15500;
await redis.set('usd_idr_rate', rate, 'EX', 43200);
return rate;
}