@PostMapping("/api/certificate/store") fun store( @RequestHeader("X-TENANT-ID") tenantId: String, @RequestParam("urn") gatewayUrn: String, @RequestBody certificate: Flux): Mono { return certificate.collectList() .map { it.reduce(ByteArray::plus) } .flatMap { service.storeCertificate(tenantId, gatewayUrn, it) } }