fixed linting

This commit is contained in:
Rahul Somasundaram 2021-08-24 07:28:17 +05:30
parent be87c45f27
commit 8944609b63
No known key found for this signature in database
GPG Key ID: B8520CB207DD49D3
4 changed files with 7 additions and 9 deletions

View File

@ -343,7 +343,6 @@ const internalCertificate = {
* @returns {Promise} * @returns {Promise}
*/ */
download: (access, data) => { download: (access, data) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
access.can('certificates:get', data) access.can('certificates:get', data)
.then(() => { .then(() => {
@ -366,8 +365,6 @@ const internalCertificate = {
fileName: opName fileName: opName
}; };
resolve(resp); resolve(resp);
}).catch((err) => {
reject(err);
}); });
} else { } else {
throw new error.ValidationError('Only Let\'sEncrypt certificates can be renewed'); throw new error.ValidationError('Only Let\'sEncrypt certificates can be renewed');

View File

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