Remove duplicated code in Routes repository

[#65037890]