mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 08:27:53 +00:00
update status api
This commit is contained in:
@@ -6,11 +6,19 @@ const router = express.Router();
|
|||||||
router.get(
|
router.get(
|
||||||
"/status",
|
"/status",
|
||||||
async (req: Request, res: Response) => {
|
async (req: Request, res: Response) => {
|
||||||
|
const gitAppId = await getSecretScanningGitAppId()
|
||||||
|
const gitSecretScanningWebhookSecret = await getSecretScanningWebhookSecret()
|
||||||
|
const gitSecretScanningPrivateKey = await getSecretScanningPrivateKey()
|
||||||
|
let secretScanningConfigured = false
|
||||||
|
if (gitAppId && gitSecretScanningPrivateKey && gitSecretScanningWebhookSecret) {
|
||||||
|
secretScanningConfigured = true
|
||||||
|
}
|
||||||
|
|
||||||
res.status(200).json({
|
res.status(200).json({
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
message: "Ok",
|
message: "Ok",
|
||||||
emailConfigured: await getSmtpConfigured(),
|
emailConfigured: await getSmtpConfigured(),
|
||||||
secretScanningConfigured: await getSecretScanningGitAppId() && await getSecretScanningWebhookSecret() && await getSecretScanningPrivateKey(),
|
secretScanningConfigured: secretScanningConfigured,
|
||||||
inviteOnlySignup: await getInviteOnlySignup()
|
inviteOnlySignup: await getInviteOnlySignup()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user