-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Upgrade calls to insert() and update(), to match with Mongodb driver ~~v2~~ v4's API #62
Open
6 of 13 tasks
Comments
This was referenced Jul 15, 2017
6 tasks
merged #64 (automated tests) to |
3 tasks
adrienjoly
added a commit
that referenced
this issue
Jul 20, 2017
adrienjoly
added a commit
that referenced
this issue
Jul 20, 2017
in abandoned feature's code collabPl.js (collaborative playlists), for #62
adrienjoly
added a commit
that referenced
this issue
Jul 20, 2017
adrienjoly
added a commit
that referenced
this issue
Jul 20, 2017
adrienjoly
added a commit
that referenced
this issue
Jul 20, 2017
doing "insertNotif function in app/models/notifs.js":
(1 failing test) |
adrienjoly
added a commit
that referenced
this issue
Sep 13, 2017
adrienjoly
added a commit
that referenced
this issue
Sep 13, 2017
adrienjoly
added a commit
that referenced
this issue
Sep 13, 2017
Migrate insert() call from models/notif.js, for #62
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
background: migration to mongodb driver v2 caused a bug: clicking on notification link after adding a track leads to /u/undefined (now fixed), because the inserted/updated data object is now stored as the first element of a
ops
array property, instead of being returned directly byinsert()
&update()
calls. (see upgrade guide and my comment on mongodb driver's upgrade guide), and #61 (comment)).=> other features relying on data returned by calls to
insert()
andupdate()
are also affected by this breaking API change => we need to fix them.Documentation of new version of the API: insert and update. (both deprecated → to be replaced by calls to
insertOne()
,insertMany()
,updateOne()
andupdateMany()
, keeping in mind thatupdateOne()
may not return the updated data )next steps:
add automated API tests that should pass with mongodb driver v1 but not on v2 for the following calls to
insert()
, then fix these calls to make tests pass with mongodb driver v2:savePost
function inapp/models/post.js
(=> issue, fix)rePost
function inapp/models/post.js
(=> api test, fix, acceptance test)insertNotif
function inapp/models/notifs.js
add
endpoint inapp/models/activity.js
save
function inapp/models/plContest.js
addFeatured
endpoint inapp/controllers/discover.js
add automated API tests that should pass with mongodb driver v1 but not on v2 for the following calls to
update()
, then fix these calls to make tests pass with mongodb driver v2:app/models/post.js
app/models/user.js
cvrImg
endpoint inapp/controllers/api/user.js
add
function inapp/models/follow.js
app/models/track.js
cacheFbFriends
function inapp/models/facebook.js
app/models/notif.js
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: