Added A post Method and create promise in factory to handle insertion