Either, both. Corsair AIO's instructions for basic AIO's like yours state the pump goes to cpu_fan header and fans go to sys fan. There's a reason for that. 7/10x the first item to fail is not the fan, but the pump. Motherboards have built in security alert if the cpu_fan header reads 0rpm (like a pump failure) the mobo will inform the cpu of the failure and pc either shuts down or refuses to boot. This is to save the cpu/motherboard from burning up.
However, this often means cpu temps are an redundant since that temp no longer affects the fan speeds, only motherboard temps/system temps do. So there's really Zero control, the fans just spin.
The other way, with pump dedicated to a sys_fan header at 100%duty cycle (set in bios) and fans on cpu_fan header works exactly the same way, however the cpu temp now directly controls the fan speeds, which is preferable if you do not want a lot of noise from high speed fans.
Either way is acceptable, much depends on you and your tastes and paranoia, and the motherboard since many new and higher grade motherboards come with cpu_aux/alt or cpu_pump headers as well as regular sys_fan. In that case, I choose pump on cpu_aux/alt/pump and fans on cpu_fan headers.