This commit is contained in:
2025-09-06 12:34:25 +03:00
parent c5ee179e71
commit 30ef449756
26 changed files with 860 additions and 207 deletions

View File

@@ -96,6 +96,14 @@ class ItemRepositoryImpl @Inject constructor(
}
// [END_ENTITY: Function('getAllLabels')]
// [ENTITY: Function('getLabelDetails')]
// [RELATION: Function('getLabelDetails')] -> [RETURNS] -> [DataClass('LabelOut')]
override suspend fun getLabelDetails(labelId: String): LabelOut {
val resultDto = apiService.getLabels().firstOrNull { it.id == labelId }
return resultDto?.toDomain() ?: throw NoSuchElementException("Label with ID $labelId not found.")
}
// [END_ENTITY: Function('getLabelDetails')]
// [ENTITY: Function('createLabel')]
// [RELATION: Function('createLabel')] -> [RETURNS] -> [DataClass('LabelSummary')]
override suspend fun createLabel(newLabelData: LabelCreate): LabelSummary {