lint: const fixes

This commit is contained in:
Girish Ramakrishnan
2024-05-13 17:02:20 +02:00
parent eb5b8b42dc
commit 6eda037544
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -184,7 +184,7 @@ async function revokeByUserId(userId) {
function revokeObjects(modelName) {
load(modelName);
for (let id in DATA_STORE[modelName]) {
for (const id in DATA_STORE[modelName]) {
if (DATA_STORE[modelName][id].payload?.accountId === userId) delete DATA_STORE[modelName][id];
}
@@ -379,7 +379,7 @@ class CloudronAdapter {
if (this.name === 'Client' || this.name === 'AccessToken') {
debug('findByUid: this should not happen as it is stored in our db');
} else {
for (let d in DATA_STORE[this.name]) {
for (const d in DATA_STORE[this.name]) {
if (DATA_STORE[this.name][d].payload.uid === uid) return DATA_STORE[this.name][d].payload;
}
@@ -446,7 +446,7 @@ class CloudronAdapter {
if (this.name === 'Client') {
debug('revokeByGrantId: this should not happen as it is stored in our db');
} else {
for (let d in DATA_STORE[this.name]) {
for (const d in DATA_STORE[this.name]) {
if (DATA_STORE[this.name][d].grantId === grantId) {
delete DATA_STORE[this.name][d];
return save(this.name);
+1 -1
View File
@@ -184,7 +184,7 @@ async function checkUpdateRequirements(boxUpdateInfo) {
const result = await apps.list();
for (let app of result) {
for (const app of result) {
const maxBoxVersion = app.manifest.maxBoxVersion;
if (semver.valid(maxBoxVersion) && semver.gt(boxUpdateInfo.version, maxBoxVersion)) {
throw new BoxError(BoxError.BAD_STATE, `Cannot update to v${boxUpdateInfo.version} because ${app.fqdn} has a maxBoxVersion of ${maxBoxVersion}`);