Explicitly type MapRoulette challenge
This commit is contained in:
parent
5c2823287a
commit
d4085d608b
2 changed files with 7 additions and 3 deletions
|
@ -1,5 +1,9 @@
|
||||||
import Constants from "../Models/Constants"
|
import Constants from "../Models/Constants"
|
||||||
|
export interface MaprouletteTask {
|
||||||
|
name: string,
|
||||||
|
description: string,
|
||||||
|
instruction: string
|
||||||
|
}
|
||||||
export default class Maproulette {
|
export default class Maproulette {
|
||||||
public static readonly defaultEndpoint = "https://maproulette.org/api/v2"
|
public static readonly defaultEndpoint = "https://maproulette.org/api/v2"
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ import StatisticsPanel from "./BigComponents/StatisticsPanel"
|
||||||
import AutoApplyButton from "./Popup/AutoApplyButton"
|
import AutoApplyButton from "./Popup/AutoApplyButton"
|
||||||
import { LanguageElement } from "./Popup/LanguageElement/LanguageElement"
|
import { LanguageElement } from "./Popup/LanguageElement/LanguageElement"
|
||||||
import FeatureReviews from "../Logic/Web/MangroveReviews"
|
import FeatureReviews from "../Logic/Web/MangroveReviews"
|
||||||
import Maproulette from "../Logic/Maproulette"
|
import Maproulette, { MaprouletteTask } from "../Logic/Maproulette"
|
||||||
import SvelteUIElement from "./Base/SvelteUIElement"
|
import SvelteUIElement from "./Base/SvelteUIElement"
|
||||||
import { BBoxFeatureSourceForLayer } from "../Logic/FeatureSource/Sources/TouchesBboxFeatureSource"
|
import { BBoxFeatureSourceForLayer } from "../Logic/FeatureSource/Sources/TouchesBboxFeatureSource"
|
||||||
import { Feature, GeoJsonProperties } from "geojson"
|
import { Feature, GeoJsonProperties } from "geojson"
|
||||||
|
@ -1039,7 +1039,7 @@ console.log(">>> ",helpTexts.join("\n\n"))
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
const challenge = Stores.FromPromise(
|
const challenge = Stores.FromPromise(
|
||||||
Utils.downloadJsonCached(
|
Utils.downloadJsonCached<MaprouletteTask>(
|
||||||
`${Maproulette.defaultEndpoint}/challenge/${parentId}`,
|
`${Maproulette.defaultEndpoint}/challenge/${parentId}`,
|
||||||
24 * 60 * 60 * 1000
|
24 * 60 * 60 * 1000
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue