瀏覽代碼

fix setting placeholder jwt secret for migrations

Pouria Ezzati 1 年之前
父節點
當前提交
c815a2e904
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      knexfile.js

+ 2 - 4
knexfile.js

@@ -1,9 +1,7 @@
 // this configuration is for migrations only
 // and since jwt secret is not required, it's set to a placehodler string to bypass env validation
-if (process.env.NODE_ENV !== "development" && process.env.NODE_ENV !== "production") {
-  if (!process.env.JWT_SECRET) {
-    process.env.JWT_SECRET = "securekey";
-  }
+if (!process.env.JWT_SECRET) {
+  process.env.JWT_SECRET = "securekey";
 }
 
 const env = require("./server/env");