mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor: Lint for no unneeded backticks (#5057) (no-changelog)
* ✨ Create rule `no-unneeded-backticks` * 👕 Enable rule * ⚡ Run rule on `cli` * ⚡ Run rule on `core` * ⚡ Run rule on `workflow` * ⚡ Rule rule on `design-system` * ⚡ Run rule on `node-dev` * ⚡ Run rule on `editor-ui` * ⚡ Run rule on `nodes-base`
This commit is contained in:
@@ -60,7 +60,7 @@ EECredentialsController.get(
|
||||
const includeDecryptedData = req.query.includeData === 'true';
|
||||
|
||||
if (Number.isNaN(Number(credentialId))) {
|
||||
throw new ResponseHelper.BadRequestError(`Credential ID must be a number.`);
|
||||
throw new ResponseHelper.BadRequestError('Credential ID must be a number.');
|
||||
}
|
||||
|
||||
let credential = (await EECredentials.get(
|
||||
@@ -77,7 +77,7 @@ EECredentialsController.get(
|
||||
const userSharing = credential.shared?.find((shared) => shared.user.id === req.user.id);
|
||||
|
||||
if (!userSharing && req.user.globalRole.name !== 'owner') {
|
||||
throw new ResponseHelper.UnauthorizedError(`Forbidden.`);
|
||||
throw new ResponseHelper.UnauthorizedError('Forbidden.');
|
||||
}
|
||||
|
||||
credential = EECredentials.addOwnerAndSharings(credential);
|
||||
@@ -124,7 +124,7 @@ EECredentialsController.post(
|
||||
const sharing = await EECredentials.getSharing(req.user, credentials.id);
|
||||
if (!ownsCredential) {
|
||||
if (!sharing) {
|
||||
throw new ResponseHelper.UnauthorizedError(`Forbidden`);
|
||||
throw new ResponseHelper.UnauthorizedError('Forbidden');
|
||||
}
|
||||
|
||||
const decryptedData = await EECredentials.decrypt(encryptionKey, sharing.credentials);
|
||||
|
||||
Reference in New Issue
Block a user