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 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,
}

View File

@ -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(