Add params middleware