Migrate modif mongodb to mongoose