forked from MapComplete/MapComplete
Fix: style issue, types
This commit is contained in:
parent
3c20d2ca8d
commit
5932dc7ad4
7 changed files with 71 additions and 73 deletions
|
@ -97,11 +97,11 @@ export class Imgur extends ImageProvider implements ImageUploader {
|
|||
const hash = url.substr("https://i.imgur.com/".length).split(/\.jpe?g/i)[0]
|
||||
|
||||
const apiUrl = "https://api.imgur.com/3/image/" + hash
|
||||
const response = await Utils.downloadJsonCached(apiUrl, 365 * 24 * 60 * 60, {
|
||||
const response = await Utils.downloadJsonCached<{data: {description: string, datetime: string, views: number}}>(apiUrl, 365 * 24 * 60 * 60, {
|
||||
Authorization: "Client-ID " + Constants.ImgurApiKey,
|
||||
})
|
||||
|
||||
const descr: string = response.data.description ?? ""
|
||||
const descr = response.data.description ?? ""
|
||||
const data: any = {}
|
||||
const imgurData = response.data
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue