diff --git a/api/Services/migrations/lib/mysql-import.js b/api/Services/migrations/lib/mysql-import.js index fe3cc067..8bf39268 100644 --- a/api/Services/migrations/lib/mysql-import.js +++ b/api/Services/migrations/lib/mysql-import.js @@ -61,7 +61,7 @@ class Importer { * @returns {undefined} */ setEncoding(encoding) { - var supported_encodings = [ + const supported_encodings = [ 'utf8', 'ucs2', 'utf16le', @@ -106,8 +106,8 @@ class Importer { return new Promise(async (resolve, reject) => { try { await this._connect(); - var files = await this._getSQLFilePaths(...input); - var error = null; + const files = await this._getSQLFilePaths(...input); + const error = null; await slowLoop(files, (file, index, next) => { if (error) { next(); @@ -163,8 +163,8 @@ class Importer { reject(err); return; } - var queries = new queryParser(queriesString).queries; - var error = null; + const queries = new queryParser(queriesString).queries; + const error = null; slowLoop(queries, (query, index, next) => { if (error) { next(); @@ -260,8 +260,8 @@ class Importer { */ _getSQLFilePaths(...paths) { return new Promise(async (resolve, reject) => { - var full_paths = []; - var error = null; + const full_paths = []; + const error = null; paths = [].concat.apply([], paths); // flatten array of paths await slowLoop(paths, async (filepath, index, next) => { if (error) { @@ -270,16 +270,16 @@ class Importer { } try { await this._fileExists(filepath); - var stat = await this._statFile(filepath); + const stat = await this._statFile(filepath); if (stat.isFile()) { if (filepath.toLowerCase().substring(filepath.length - 4) === '.sql') { full_paths.push(path.resolve(filepath)); } next(); } else if (stat.isDirectory()) { - var more_paths = await this._readDir(filepath); + const more_paths = await this._readDir(filepath); more_paths = more_paths.map(p => path.join(filepath, p)); - var sql_files = await this._getSQLFilePaths(...more_paths); + const sql_files = await this._getSQLFilePaths(...more_paths); full_paths.push(...sql_files); next(); } else { @@ -394,12 +394,12 @@ class queryParser { // Check to see if a new delimiter is being assigned checkNewDelimiter(char) { - var buffer_str = this.buffer.join('').toLowerCase().trim(); + const buffer_str = this.buffer.join('').toLowerCase().trim(); if (buffer_str === 'delimiter' && !this.quoteType) { this.seekingDelimiter = true; this.buffer = []; } else { - var isNewLine = char === "\n" || char === "\r"; + const isNewLine = char === "\n" || char === "\r"; if (isNewLine && this.seekingDelimiter) { this.seekingDelimiter = false; this.delimiter = this.buffer.join('').trim(); @@ -410,7 +410,7 @@ class queryParser { // Check if the current char is a quote checkQuote(char) { - var isQuote = (char === '"' || char === "'") && !this.escaped; + const isQuote = (char === '"' || char === "'") && !this.escaped; if (isQuote && this.quoteType === char) { this.quoteType = false; } else if (isQuote && !this.quoteType) { @@ -420,7 +420,7 @@ class queryParser { // Check if we're at the end of the query checkEndOfQuery() { - var demiliterFound = false; + const demiliterFound = false; if (!this.quoteType && this.buffer.length >= this.delimiter.length) { demiliterFound = this.buffer.slice(-this.delimiter.length).join('') === this.delimiter; } diff --git a/api/Services/poamMilestoneService.js b/api/Services/poamMilestoneService.js index 6046f2ed..dc7c3706 100644 --- a/api/Services/poamMilestoneService.js +++ b/api/Services/poamMilestoneService.js @@ -188,7 +188,7 @@ exports.deletePoamMilestone = async function deletePoamMilestone(poamId, milesto let sql = "DELETE FROM cpat.poammilestones WHERE poamId= ? AND milestoneId = ?"; await connection.query(sql, [poamId, milestoneId]); - const action = `Milestone Deleted.`; + let action = `Milestone Deleted.`; if (requestBody.requestorId) { if (requestBody.extension == true) { action = `Extension milestone deleted.`; diff --git a/client/src/app/Shared/notifications/notifications-popover/notifications-popover.component.html b/client/src/app/Shared/notifications/notifications-popover/notifications-popover.component.html index e70252d9..4d111613 100644 --- a/client/src/app/Shared/notifications/notifications-popover/notifications-popover.component.html +++ b/client/src/app/Shared/notifications/notifications-popover/notifications-popover.component.html @@ -19,7 +19,7 @@
{{ notification.message }}
{{ notification.timestamp | date:'short' }} diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index 45dcf401..b5b99629 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts @@ -24,7 +24,7 @@ const routes: Routes = [ { path: 'poam-processing', canActivate: [AuthGuard], loadChildren: () => import('./pages/poam-processing/poam-processing.module').then(m => m.PoamProcessingModule) }, { path: 'marketplace', canActivate: [AuthGuard], loadChildren: () => import('./pages/marketplace/marketplace.module').then(m => m.MarketplaceModule) }, { path: 'unauthorized', component: UnauthorizedComponent }, - { path: '' || '**', redirectTo: 'consent' }, + { path: '**', redirectTo: 'consent' }, ]; @NgModule({ imports: [RouterModule.forRoot(routes)], diff --git a/client/src/app/app.component.html b/client/src/app/app.component.html index 5a135083..0ca56940 100644 --- a/client/src/app/app.component.html +++ b/client/src/app/app.component.html @@ -12,7 +12,7 @@{{invalidDataMessage}}
{{ theme.themeDescription }}
{{ theme.themeDescription }}
{{errorMessage}}