Fixing a parseInt error in the API routing