Ver Fonte

fixed linting

Rahul Somasundaram há 4 anos atrás
pai
commit
8944609b63

+ 4 - 7
backend/internal/certificate.js

@@ -343,7 +343,6 @@ const internalCertificate = {
 	 * @returns {Promise}
 	 */
 	download: (access, data) => {
-
 		return new Promise((resolve, reject) => {
 			access.can('certificates:get', data)
 				.then(() => {
@@ -366,8 +365,6 @@ const internalCertificate = {
 									fileName: opName
 								};
 								resolve(resp);
-							}).catch((err) => {
-								reject(err);
 							});
 					} else {
 						throw new error.ValidationError('Only Let\'sEncrypt certificates can be renewed');
@@ -377,10 +374,10 @@ const internalCertificate = {
 	},
 
 	/**
-		 * @param {String} source
-		 * @param {String} out
-		 * @returns {Promise}
-		 */
+	* @param   {String}  source
+	* @param   {String}  out
+	* @returns {Promise}
+	*/
 	zipDirectory(source, out) {
 		const archive = archiver('zip', { zlib: { level: 9 } });
 		const stream  = fs.createWriteStream(out);

+ 1 - 1
frontend/js/app/nginx/certificates/list/item.ejs

@@ -41,7 +41,7 @@
             <span class="dropdown-header"><%- i18n('audit-log', 'certificate') %> #<%- id %></span>
             <% if (provider === 'letsencrypt') { %>
                 <a href="#" class="renew dropdown-item"><i class="dropdown-icon fe fe-refresh-cw"></i> <%- i18n('certificates', 'force-renew') %></a>
-                <a href="#" class="download dropdown-item"><i class="dropdown-icon fe fe-download"></i><%- i18n('certificates', 'download') %></a>
+                <a href="#" class="download dropdown-item"><i class="dropdown-icon fe fe-download"></i> <%- i18n('certificates', 'download') %></a>
                 <div class="dropdown-divider"></div>
             <% } %>
             <a href="#" class="delete dropdown-item"><i class="dropdown-icon fe fe-trash-2"></i> <%- i18n('str', 'delete') %></a>

+ 1 - 0
frontend/js/app/nginx/certificates/list/item.js

@@ -31,6 +31,7 @@ module.exports = Mn.View.extend({
             let win = window.open($(e.currentTarget).attr('rel'), '_blank');
             win.focus();
         },
+        
         'click @ui.download': function (e) {
             e.preventDefault();
             App.Api.Nginx.Certificates.download(this.model.get('id'))

+ 1 - 1
frontend/js/i18n/messages.json

@@ -188,7 +188,7 @@
       "other-certificate-key": "Certificate Key",
       "other-intermediate-certificate": "Intermediate Certificate",
       "force-renew": "Renew Now",
-      "download":"Download",
+      "download": "Download",
       "renew-title": "Renew Let'sEncrypt Certificate"
     },
     "access-lists": {