fix posts route to use mongoose