From d9c6e521a675d7a0f004fb6ecff39c4ffbd119ab Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 1 Jul 2024 00:47:57 +0200 Subject: [PATCH] Rename field --- .../app/revanced/api/configuration/schema/APISchema.kt | 4 ++-- .../revanced/api/configuration/services/PatchesService.kt | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/app/revanced/api/configuration/schema/APISchema.kt b/src/main/kotlin/app/revanced/api/configuration/schema/APISchema.kt index 1230ce1..8accc5a 100644 --- a/src/main/kotlin/app/revanced/api/configuration/schema/APISchema.kt +++ b/src/main/kotlin/app/revanced/api/configuration/schema/APISchema.kt @@ -50,11 +50,11 @@ class APIAsset( val downloadUrl: String, val signatureDownloadUrl: String, // TODO: Remove this eventually when integrations are merged into patches. - val type: APIAssetType, + val name: APIAssetName, ) @Serializable -enum class APIAssetType { +enum class APIAssetName { PATCHES, INTEGRATION, } diff --git a/src/main/kotlin/app/revanced/api/configuration/services/PatchesService.kt b/src/main/kotlin/app/revanced/api/configuration/services/PatchesService.kt index 2024b67..de23442 100644 --- a/src/main/kotlin/app/revanced/api/configuration/services/PatchesService.kt +++ b/src/main/kotlin/app/revanced/api/configuration/services/PatchesService.kt @@ -31,20 +31,20 @@ internal class PatchesService( fun ConfigurationRepository.AssetConfiguration.asset( release: BackendRepository.BackendOrganization.BackendRepository.BackendRelease, - assetType: APIAssetType, + assetName: APIAssetName, ) = APIAsset( release.assets.first(assetRegex).downloadUrl, release.assets.first(signatureAssetRegex).downloadUrl, - assetType, + assetName, ) val patchesAsset = configurationRepository.patches.asset( patchesRelease, - APIAssetType.PATCHES, + APIAssetName.PATCHES, ) val integrationsAsset = configurationRepository.integrations.asset( integrationsRelease, - APIAssetType.INTEGRATION, + APIAssetName.INTEGRATION, ) return APIRelease(