updated module to use middleware instead of overriding post method