Rename field

This commit is contained in:
oSumAtrIX 2024-07-01 00:47:57 +02:00
parent df32531770
commit d9c6e521a6
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 6 additions and 6 deletions

View File

@ -50,11 +50,11 @@ class APIAsset(
val downloadUrl: String, val downloadUrl: String,
val signatureDownloadUrl: String, val signatureDownloadUrl: String,
// TODO: Remove this eventually when integrations are merged into patches. // TODO: Remove this eventually when integrations are merged into patches.
val type: APIAssetType, val name: APIAssetName,
) )
@Serializable @Serializable
enum class APIAssetType { enum class APIAssetName {
PATCHES, PATCHES,
INTEGRATION, INTEGRATION,
} }

View File

@ -31,20 +31,20 @@ internal class PatchesService(
fun ConfigurationRepository.AssetConfiguration.asset( fun ConfigurationRepository.AssetConfiguration.asset(
release: BackendRepository.BackendOrganization.BackendRepository.BackendRelease, release: BackendRepository.BackendOrganization.BackendRepository.BackendRelease,
assetType: APIAssetType, assetName: APIAssetName,
) = APIAsset( ) = APIAsset(
release.assets.first(assetRegex).downloadUrl, release.assets.first(assetRegex).downloadUrl,
release.assets.first(signatureAssetRegex).downloadUrl, release.assets.first(signatureAssetRegex).downloadUrl,
assetType, assetName,
) )
val patchesAsset = configurationRepository.patches.asset( val patchesAsset = configurationRepository.patches.asset(
patchesRelease, patchesRelease,
APIAssetType.PATCHES, APIAssetName.PATCHES,
) )
val integrationsAsset = configurationRepository.integrations.asset( val integrationsAsset = configurationRepository.integrations.asset(
integrationsRelease, integrationsRelease,
APIAssetType.INTEGRATION, APIAssetName.INTEGRATION,
) )
return APIRelease( return APIRelease(