From f06d7810beec2cf3643558cc2dff024eea6323f1 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Sun, 1 Sep 2024 14:23:01 +0700 Subject: [PATCH] feat: show password required in info endpoint --- .env.example | 1 + app/actions.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.env.example b/.env.example index 402ba73..78ed5b3 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,7 @@ DATABASE_URL="file:./jim.db" BASE_URL="http://localhost:3000" DAILY_WALLET_LIMIT=10 #APP_NAME_PREFIX = "Alby Jim " +#PASSWORD="My super secret password" # Info NAME="Uncle Jim Demo Server" diff --git a/app/actions.ts b/app/actions.ts index b33538b..3de5795 100644 --- a/app/actions.ts +++ b/app/actions.ts @@ -179,11 +179,13 @@ export async function getReserves(): Promise { } export async function getInfo() { + const passwordRequired: boolean = Boolean(process.env.PASSWORD); return { name: process.env.NAME, description: process.env.DESCRIPTION, image: process.env.IMAGE, dailyWalletLimit: getDailyWalletLimit(), + passwordRequired, }; }