resource-watch/query

View on GitHub
app/src/services/endpoints.js

Summary

Maintainability
F
2 wks
Test Coverage
A
100%

File endpoints.js has 918 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable no-template-curly-in-string */
module.exports = {
    cf_viirsfiresbyiso: {
        uri: '/viirs-active-fires/admin/${iso}',
        method: 'GET',
Severity: Major
Found in app/src/services/endpoints.js - About 2 days to fix

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

        cf_imazonalertsbyisoandregion: {
            uri: '/imazon-alerts/admin/${iso}/${id1}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 3 other locations - About 4 hrs to fix
    app/src/services/endpoints.js on lines 388..416
    app/src/services/endpoints.js on lines 578..606
    app/src/services/endpoints.js on lines 632..660

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 124.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_quiccalertsbyuse: {
            uri: '/quicc-alerts/use/${name}/${id}',
            method: 'GET',
            arguments: [{
                name: 'name',
    Severity: Major
    Found in app/src/services/endpoints.js and 3 other locations - About 4 hrs to fix
    app/src/services/endpoints.js on lines 334..362
    app/src/services/endpoints.js on lines 388..416
    app/src/services/endpoints.js on lines 578..606

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 124.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_quiccalertsbyisoandregion: {
            uri: '/quicc-alerts/admin/${iso}/${id1}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 3 other locations - About 4 hrs to fix
    app/src/services/endpoints.js on lines 334..362
    app/src/services/endpoints.js on lines 388..416
    app/src/services/endpoints.js on lines 632..660

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 124.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_imazonalertsbyuse: {
            uri: '/imazon-alerts/use/${name}/${id}',
            method: 'GET',
            arguments: [{
                name: 'name',
    Severity: Major
    Found in app/src/services/endpoints.js and 3 other locations - About 4 hrs to fix
    app/src/services/endpoints.js on lines 334..362
    app/src/services/endpoints.js on lines 578..606
    app/src/services/endpoints.js on lines 632..660

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 124.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_quiccalertsbywdpa: {
            uri: '/quicc-alerts/wdpa/${id}',
            method: 'GET',
            arguments: [{
                name: 'id',
    Severity: Major
    Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
    app/src/services/endpoints.js on lines 309..333
    app/src/services/endpoints.js on lines 363..387
    app/src/services/endpoints.js on lines 417..441
    app/src/services/endpoints.js on lines 553..577
    app/src/services/endpoints.js on lines 661..685

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_imazonalertsbygeostore: {
            uri: '/imazon-alerts',
            method: 'GET',
            arguments: [{
                name: 'geostore',
    Severity: Major
    Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
    app/src/services/endpoints.js on lines 309..333
    app/src/services/endpoints.js on lines 363..387
    app/src/services/endpoints.js on lines 553..577
    app/src/services/endpoints.js on lines 607..631
    app/src/services/endpoints.js on lines 661..685

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_umdlossgainbyuse: {
            uri: '/terrai-alerts/use/${name}/${id}',
            method: 'GET',
            arguments: [{
                name: 'name',
    Severity: Major
    Found in app/src/services/endpoints.js and 1 other location - About 3 hrs to fix
    app/src/services/endpoints.js on lines 818..842

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_imazonalertsbywdpa: {
            uri: '/imazon-alerts/wdpa/${id}',
            method: 'GET',
            arguments: [{
                name: 'id',
    Severity: Major
    Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
    app/src/services/endpoints.js on lines 309..333
    app/src/services/endpoints.js on lines 417..441
    app/src/services/endpoints.js on lines 553..577
    app/src/services/endpoints.js on lines 607..631
    app/src/services/endpoints.js on lines 661..685

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_umdlossgainbyisoandregion: {
            uri: '/terrai-alerts/admin/${iso}/${id1}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 1 other location - About 3 hrs to fix
    app/src/services/endpoints.js on lines 864..888

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_quiccalertsbygeostore: {
            uri: '/quicc-alerts',
            method: 'GET',
            arguments: [{
                name: 'geostore',
    Severity: Major
    Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
    app/src/services/endpoints.js on lines 309..333
    app/src/services/endpoints.js on lines 363..387
    app/src/services/endpoints.js on lines 417..441
    app/src/services/endpoints.js on lines 553..577
    app/src/services/endpoints.js on lines 607..631

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_imazonalertsbyiso: {
            uri: '/imazon-alerts/admin/${iso}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
    app/src/services/endpoints.js on lines 363..387
    app/src/services/endpoints.js on lines 417..441
    app/src/services/endpoints.js on lines 553..577
    app/src/services/endpoints.js on lines 607..631
    app/src/services/endpoints.js on lines 661..685

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_quiccalertsbyiso: {
            uri: '/quicc-alerts/admin/${iso}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
    app/src/services/endpoints.js on lines 309..333
    app/src/services/endpoints.js on lines 363..387
    app/src/services/endpoints.js on lines 417..441
    app/src/services/endpoints.js on lines 607..631
    app/src/services/endpoints.js on lines 661..685

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_prodeslossbyisoandregion: {
            uri: '/prodes-loss/admin/${iso}/${id1}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 20..40
    app/src/services/endpoints.js on lines 58..78
    app/src/services/endpoints.js on lines 122..142
    app/src/services/endpoints.js on lines 160..180
    app/src/services/endpoints.js on lines 224..244
    app/src/services/endpoints.js on lines 262..282
    app/src/services/endpoints.js on lines 506..526
    app/src/services/endpoints.js on lines 712..732
    app/src/services/endpoints.js on lines 750..770

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_viirsfiresbyisoandregion: {
            uri: '/viirs-active-fires/admin/${iso}/${id1}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 58..78
    app/src/services/endpoints.js on lines 122..142
    app/src/services/endpoints.js on lines 160..180
    app/src/services/endpoints.js on lines 224..244
    app/src/services/endpoints.js on lines 262..282
    app/src/services/endpoints.js on lines 468..488
    app/src/services/endpoints.js on lines 506..526
    app/src/services/endpoints.js on lines 712..732
    app/src/services/endpoints.js on lines 750..770

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_viirsfiresbyuse: {
            uri: '/viirs-active-fires/use/${name}/${id}',
            method: 'GET',
            arguments: [{
                name: 'name',
    Severity: Major
    Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 20..40
    app/src/services/endpoints.js on lines 122..142
    app/src/services/endpoints.js on lines 160..180
    app/src/services/endpoints.js on lines 224..244
    app/src/services/endpoints.js on lines 262..282
    app/src/services/endpoints.js on lines 468..488
    app/src/services/endpoints.js on lines 506..526
    app/src/services/endpoints.js on lines 712..732
    app/src/services/endpoints.js on lines 750..770

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_gladalertsbyuse: {
            uri: '/glad-alerts/use/${name}/${id}',
            method: 'GET',
            arguments: [{
                name: 'name',
    Severity: Major
    Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 20..40
    app/src/services/endpoints.js on lines 58..78
    app/src/services/endpoints.js on lines 122..142
    app/src/services/endpoints.js on lines 224..244
    app/src/services/endpoints.js on lines 262..282
    app/src/services/endpoints.js on lines 468..488
    app/src/services/endpoints.js on lines 506..526
    app/src/services/endpoints.js on lines 712..732
    app/src/services/endpoints.js on lines 750..770

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_prodeslossbyuse: {
            uri: '/prodes-loss/use/${name}/${id}',
            method: 'GET',
            arguments: [{
                name: 'name',
    Severity: Major
    Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 20..40
    app/src/services/endpoints.js on lines 58..78
    app/src/services/endpoints.js on lines 122..142
    app/src/services/endpoints.js on lines 160..180
    app/src/services/endpoints.js on lines 224..244
    app/src/services/endpoints.js on lines 262..282
    app/src/services/endpoints.js on lines 468..488
    app/src/services/endpoints.js on lines 712..732
    app/src/services/endpoints.js on lines 750..770

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_terraialertsbyuse: {
            uri: '/terrai-alerts/use/${name}/${id}',
            method: 'GET',
            arguments: [{
                name: 'name',
    Severity: Major
    Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 20..40
    app/src/services/endpoints.js on lines 58..78
    app/src/services/endpoints.js on lines 122..142
    app/src/services/endpoints.js on lines 160..180
    app/src/services/endpoints.js on lines 224..244
    app/src/services/endpoints.js on lines 262..282
    app/src/services/endpoints.js on lines 468..488
    app/src/services/endpoints.js on lines 506..526
    app/src/services/endpoints.js on lines 712..732

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_gladalertsbyisoandregion: {
            uri: '/glad-alerts/admin/${iso}/${id1}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 20..40
    app/src/services/endpoints.js on lines 58..78
    app/src/services/endpoints.js on lines 160..180
    app/src/services/endpoints.js on lines 224..244
    app/src/services/endpoints.js on lines 262..282
    app/src/services/endpoints.js on lines 468..488
    app/src/services/endpoints.js on lines 506..526
    app/src/services/endpoints.js on lines 712..732
    app/src/services/endpoints.js on lines 750..770

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_guiralossbyuse: {
            uri: '/guira-loss/use/${name}/${id}',
            method: 'GET',
            arguments: [{
                name: 'name',
    Severity: Major
    Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 20..40
    app/src/services/endpoints.js on lines 58..78
    app/src/services/endpoints.js on lines 122..142
    app/src/services/endpoints.js on lines 160..180
    app/src/services/endpoints.js on lines 224..244
    app/src/services/endpoints.js on lines 468..488
    app/src/services/endpoints.js on lines 506..526
    app/src/services/endpoints.js on lines 712..732
    app/src/services/endpoints.js on lines 750..770

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_terraialertsbyisoandregion: {
            uri: '/terrai-alerts/admin/${iso}/${id1}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 20..40
    app/src/services/endpoints.js on lines 58..78
    app/src/services/endpoints.js on lines 122..142
    app/src/services/endpoints.js on lines 160..180
    app/src/services/endpoints.js on lines 224..244
    app/src/services/endpoints.js on lines 262..282
    app/src/services/endpoints.js on lines 468..488
    app/src/services/endpoints.js on lines 506..526
    app/src/services/endpoints.js on lines 750..770

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_guiralossbyisoandregion: {
            uri: '/guira-loss/admin/${iso}/${id1}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 20..40
    app/src/services/endpoints.js on lines 58..78
    app/src/services/endpoints.js on lines 122..142
    app/src/services/endpoints.js on lines 160..180
    app/src/services/endpoints.js on lines 262..282
    app/src/services/endpoints.js on lines 468..488
    app/src/services/endpoints.js on lines 506..526
    app/src/services/endpoints.js on lines 712..732
    app/src/services/endpoints.js on lines 750..770

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_umdlossgainbyiso: {
            uri: '/terrai-alerts/admin/${iso}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 2 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 843..863
    app/src/services/endpoints.js on lines 889..909

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_umdlossgainbywdpa: {
            uri: '/terrai-alerts/wdpa/${id}',
            method: 'GET',
            arguments: [{
                name: 'id',
    Severity: Major
    Found in app/src/services/endpoints.js and 2 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 797..817
    app/src/services/endpoints.js on lines 889..909

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_umdlossgainbygeostore: {
            uri: '/terrai-alerts',
            method: 'GET',
            arguments: [{
                name: 'geostore',
    Severity: Major
    Found in app/src/services/endpoints.js and 2 other locations - About 2 hrs to fix
    app/src/services/endpoints.js on lines 797..817
    app/src/services/endpoints.js on lines 843..863

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_guiralossbywdpa: {
            uri: '/guira-loss/wdpa/${id}',
            method: 'GET',
            arguments: [{
                name: 'id',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_terraialertsbyiso: {
            uri: '/terrai-alerts/admin/${iso}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_gladalertsbyiso: {
            uri: '/glad-alerts/admin/${iso}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_prodeslossbywdpa: {
            uri: '/prodes-loss/wdpa/${id}',
            method: 'GET',
            arguments: [{
                name: 'id',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_guiralossbygeostore: {
            uri: '/guira-loss',
            method: 'GET',
            arguments: [{
                name: 'geostore',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_prodeslossbygeostore: {
            uri: '/prodes-loss',
            method: 'GET',
            arguments: [{
                name: 'geostore',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_prodeslossbyiso: {
            uri: '/prodes-loss/admin/${iso}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_terraialertsbywdpa: {
            uri: '/terrai-alerts/wdpa/${id}',
            method: 'GET',
            arguments: [{
                name: 'id',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_viirsfiresbywdpa: {
            uri: '/viirs-active-fires/wdpa/${id}',
            method: 'GET',
            arguments: [{
                name: 'id',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_guiralossbyiso: {
            uri: '/guira-loss/admin/${iso}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_viirsfiresbyiso: {
            uri: '/viirs-active-fires/admin/${iso}',
            method: 'GET',
            arguments: [{
                name: 'iso',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_viirsfiresbygeostore: {
            uri: '/viirs-active-fires',
            method: 'GET',
            arguments: [{
                name: 'geostore',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_terraialertsbygeostore: {
            uri: '/terrai-alerts',
            method: 'GET',
            arguments: [{
                name: 'geostore',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_gladalertsbywdpa: {
            uri: '/glad-alerts/wdpa/${id}',
            method: 'GET',
            arguments: [{
                name: 'id',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 181..197
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        cf_gladalertsbygeostore: {
            uri: '/glad-alerts',
            method: 'GET',
            arguments: [{
                name: 'geostore',
    Severity: Major
    Found in app/src/services/endpoints.js and 14 other locations - About 1 hr to fix
    app/src/services/endpoints.js on lines 3..19
    app/src/services/endpoints.js on lines 41..57
    app/src/services/endpoints.js on lines 79..95
    app/src/services/endpoints.js on lines 105..121
    app/src/services/endpoints.js on lines 143..159
    app/src/services/endpoints.js on lines 207..223
    app/src/services/endpoints.js on lines 245..261
    app/src/services/endpoints.js on lines 283..299
    app/src/services/endpoints.js on lines 451..467
    app/src/services/endpoints.js on lines 489..505
    app/src/services/endpoints.js on lines 527..543
    app/src/services/endpoints.js on lines 695..711
    app/src/services/endpoints.js on lines 733..749
    app/src/services/endpoints.js on lines 771..787

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 73.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status