bcgov/vue-scaffold

View on GitHub
app/src/components/cdogsService.js

Summary

Maintainability
C
1 day
Test Coverage
F
0%

Showing 3 of 3 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

constructor({ tokenUrl, clientId, clientSecret, apiUrl }) {
log.verbose(`Constructed with ${tokenUrl}, ${clientId}, clientSecret, ${apiUrl}`, { function: 'constructor' });
if (!tokenUrl || !clientId || !clientSecret || !apiUrl) {
log.error('Invalid configuration.', { function: 'constructor' });
throw new Error('CdogsService is not configured. Check configuration.');
Severity: Major
Found in app/src/components/cdogsService.js and 1 other location - About 1 day to fix
app/src/components/chesService.js on lines 10..20

Identical blocks of code found in 2 locations. Consider refactoring.
Open

const { data, status } = await this.axios.get(url, {
headers: {
'Content-Type': 'application/json'
}
});
Severity: Minor
Found in app/src/components/cdogsService.js and 1 other location - About 30 mins to fix
app/src/components/cdogsService.js on lines 80..84

Identical blocks of code found in 2 locations. Consider refactoring.
Open

const { data, status } = await this.axios.get(url, {
headers: {
'Content-Type': 'application/json'
}
});
Severity: Minor
Found in app/src/components/cdogsService.js and 1 other location - About 30 mins to fix
app/src/components/cdogsService.js on lines 30..34
Category
Status