Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecated push method #96

Open
beratetik opened this issue Dec 31, 2019 · 1 comment · May be fixed by #116
Open

deprecated push method #96

beratetik opened this issue Dec 31, 2019 · 1 comment · May be fixed by #116

Comments

@beratetik
Copy link

beratetik commented Dec 31, 2019

native push method triggers mongoDB's $pushAll method. It's deprecated after MongoDB 3.6.2.
Need to replace with concat method => this.favorites = this.favorites.concat([id]);

this.favorites.push(id);

@klamping
Copy link

Nice, this fixed an error I had with not being able to follow users. Might see if I can open a PR with these updates (although it will probably never be accepted).

cirosantilli added a commit to cirosantilli/node-express-realworld-example-app that referenced this issue Mar 22, 2021
cirosantilli added a commit to cirosantilli/node-express-realworld-example-app that referenced this issue Mar 22, 2021
Otherwise actions such as commenting fail with:

Unknown modifier: $pushAll

As per: https://stackoverflow.com/questions/48607918/mongoerror-unknown-modifier-pushall-in-node-js/50435618#50435618

Tested on Ubuntu 20.10, Mongo 4.4.4, https://github.com/gothinkster/vue-realworld-example-app
at 61742206c170db02b04d63c7e9d43807d8c6b902 with only the URL modified:

diff --git a/src/common/config.js b/src/common/config.js
index 03af84e..ccd9c4d 100644
--- a/src/common/config.js
+++ b/src/common/config.js
@@ -1,2 +1,2 @@
-export const API_URL = "https://conduit.productionready.io/api";
+export const API_URL = "http://localhost:3000/api";
 export default API_URL;

Fix gothinkster#57
Fix gothinkster#96
Fix gothinkster#64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants