mirror of
https://github.com/mihonapp/mihon.git
synced 2025-02-04 14:25:14 +01:00
8c437ceecf
* Refactor the ExtensionRepoService to use DTOs Slightly refactored the `ExtensionRepoService` so it uses a DTO with `parseAs` to avoid parsing the JSON response by hand. The default Json instance Injekt provides here has `ignoreUnknownKeys` enabled, so the `ExtensionRepoMetaDto` only specifies the meta key of the response content. The extension function `toExtensionRepo` allows for mapping the new DTO to the `domain` `ExtensionRepo` data class. * Implement feedback - Removed SerialName of the ExtensionRepoMetaDto property and renamed it `meta`, same as the incoming attribute. - Added a more general catch clause that also logs the occurring Exception Detekt likes to complain about TooGenericExceptionCaught, hence the Suppress annotation on the function.