Procházet zdrojové kódy

update

tags/Baseline_30082024_BACKEND_UAT
MSI\derek před 1 rokem
rodič
revize
879056f353
1 změnil soubory, kde provedl 2 přidání a 7 odebrání
  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 Zobrazit soubor

@@ -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
)
}


Načítá se…
Zrušit
Uložit