switch on gist.github

This commit is contained in:
Antony 2022-08-25 14:32:03 +02:00
parent ff05ad897d
commit be3f00d126

View file

@ -338,7 +338,7 @@ object BackupUtils {
ioSafe { ioSafe {
val gistUrl = githubApi.getLatestLoginData()?.server ?: throw IllegalAccessException() val gistUrl = githubApi.getLatestLoginData()?.server ?: throw IllegalAccessException()
val jsondata = app.get(gistUrl).text val jsondata = app.get(gistUrl).text
val dataraw = parseJson<GithubApi.gistsElements>(jsondata ?: "").files.values.first().dataRaw val dataraw = parseJson<GithubApi.gistsElements>(jsondata ?: "").files.values.first().dataRaw?: throw IllegalAccessException()
val data = parseJson<BackupFile>(dataraw) val data = parseJson<BackupFile>(dataraw)
this@restorePromptGithub.restore( this@restorePromptGithub.restore(
data, data,