瀏覽代碼

Fixes formatting

Julian Reinhardt 4 年之前
父節點
當前提交
c86a1a50bd
共有 2 個文件被更改,包括 16 次插入16 次删除
  1. 2 2
      backend/internal/certificate.js
  2. 14 14
      backend/routes/api/nginx/certificates.js

+ 2 - 2
backend/internal/certificate.js

@@ -16,7 +16,7 @@ const letsencryptConfig  = '/etc/letsencrypt.ini';
 const certbotCommand     = 'certbot';
 const archiver           = require('archiver');
 const path               = require('path');
-const { isArray } = require('lodash');
+const { isArray }        = require('lodash');
 
 function omissions() {
 	return ['is_deleted'];
@@ -1134,7 +1134,7 @@ const internalCertificate = {
 		}
 		
 		// Create a test challenge file
-		const testChallengeDir = '/data/letsencrypt-acme-challenge/.well-known/acme-challenge';
+		const testChallengeDir  = '/data/letsencrypt-acme-challenge/.well-known/acme-challenge';
 		const testChallengeFile = testChallengeDir + '/test-challenge';
 		fs.mkdirSync(testChallengeDir, {recursive: true});
 		fs.writeFileSync(testChallengeFile, 'Success', {encoding: 'utf8'});

+ 14 - 14
backend/routes/api/nginx/certificates.js

@@ -73,26 +73,26 @@ router
  *
  * /api/nginx/certificates/test-http
  */
- router
- .route('/test-http')
- .options((req, res) => {
-	 res.sendStatus(204);
- })
- .all(jwtdecode())
+router
+	.route('/test-http')
+	.options((req, res) => {
+		res.sendStatus(204);
+	})
+	.all(jwtdecode())
 
 /**
  * GET /api/nginx/certificates/test-http
  *
  * Test HTTP challenge for domains
  */
- .get((req, res, next) => {
-	 internalCertificate.testHttpsChallenge(res.locals.access, JSON.parse(req.query.domains))
-		 .then((result) => {
-			 res.status(200)
-				 .send(result);
-		 })
-		 .catch(next);
- });
+	.get((req, res, next) => {
+		internalCertificate.testHttpsChallenge(res.locals.access, JSON.parse(req.query.domains))
+			.then((result) => {
+				res.status(200)
+					.send(result);
+			})
+			.catch(next);
+	});
 
 /**
  * Specific certificate