Sfoglia il codice sorgente

update

tags/Baseline_30082024_BACKEND_UAT
MSI\derek 1 anno fa
parent
commit
879056f353
1 ha cambiato i file con 2 aggiunte e 7 eliminazioni
  1. +2
    -7
      src/main/java/com/ffii/tsms/modules/data/web/TeamController.kt

+ 2
- 7
src/main/java/com/ffii/tsms/modules/data/web/TeamController.kt Vedi File

@@ -43,14 +43,9 @@ class TeamController(
@GetMapping("/{id}")
fun getStaff(@PathVariable id: Long): Map<String, Any> {
val staffList = staffsService.findAllByTeamId(id).orElseThrow { NotFoundException() }
val staffIdList: MutableList<Long> = mutableListOf()
for (staff in staffList) {
staffIdList.add(staff.id as Long)
}
// val map: Map<String, Any> = java.util.Map.of("team" to teamService.find(id).orElseThrow { NotFoundException() })
// map["staffIds"] = staffIdList
val staffIdList: List<Long?> = staffList.map { it.id }
return java.util.Map.of(
"team", staffsService.find(id).orElseThrow { NotFoundException() },
"team", teamService.find(id).orElseThrow { NotFoundException() },
"staffIds", staffIdList
)
}


Caricamento…
Annulla
Salva