From a036e902228f579a1462d4cf0227a7059666e417 Mon Sep 17 00:00:00 2001
From: Dominik Hebeler <dominik@hebeler.club>
Date: Thu, 13 Apr 2023 12:10:03 +0200
Subject: [PATCH] checking valid purchase amount from config

---
 pass/routes/key.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pass/routes/key.js b/pass/routes/key.js
index 5d85e83..bdde5b0 100644
--- a/pass/routes/key.js
+++ b/pass/routes/key.js
@@ -164,7 +164,7 @@ router.use(
     .optional({ checkFalsy: true })
     .isInt()
     .toInt()
-    .isIn([300, 600, 900, 1200, 1800, 3600]),
+    .isIn(config.get("price.purchasable")),
   (req, res, next) => {
     // Input Validation
     const errors = validationResult(req);
-- 
GitLab