mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-09-14 10:52:34 +00:00
Introducing the Setup Wizard for creating the first user
- no longer setup a default - still able to do that with env vars however
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import express from "express";
|
||||
import errs from "../lib/error.js";
|
||||
import pjson from "../package.json" with { type: "json" };
|
||||
import { isSetup } from "../setup.js";
|
||||
import auditLogRoutes from "./audit-log.js";
|
||||
import accessListsRoutes from "./nginx/access_lists.js";
|
||||
import certificatesHostsRoutes from "./nginx/certificates.js";
|
||||
@@ -24,11 +25,13 @@ const router = express.Router({
|
||||
* Health Check
|
||||
* GET /api
|
||||
*/
|
||||
router.get("/", (_, res /*, next*/) => {
|
||||
router.get("/", async (_, res /*, next*/) => {
|
||||
const version = pjson.version.split("-").shift().split(".");
|
||||
const setup = await isSetup();
|
||||
|
||||
res.status(200).send({
|
||||
status: "OK",
|
||||
setup,
|
||||
version: {
|
||||
major: Number.parseInt(version.shift(), 10),
|
||||
minor: Number.parseInt(version.shift(), 10),
|
||||
|
Reference in New Issue
Block a user