mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
update status api
This commit is contained in:
@@ -6,11 +6,19 @@ const router = express.Router();
|
||||
router.get(
|
||||
"/status",
|
||||
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({
|
||||
date: new Date(),
|
||||
message: "Ok",
|
||||
emailConfigured: await getSmtpConfigured(),
|
||||
secretScanningConfigured: await getSecretScanningGitAppId() && await getSecretScanningWebhookSecret() && await getSecretScanningPrivateKey(),
|
||||
secretScanningConfigured: secretScanningConfigured,
|
||||
inviteOnlySignup: await getInviteOnlySignup()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user