Skip to content

modify db.update to receive one param {data, collection}#175

Merged
git-voo merged 4 commits into
developmentfrom
fix-db.update
Feb 10, 2025
Merged

modify db.update to receive one param {data, collection}#175
git-voo merged 4 commits into
developmentfrom
fix-db.update

Conversation

@git-voo
Copy link
Copy Markdown
Contributor

@git-voo git-voo commented Feb 10, 2025

mongo controller.update() only reads one param, hence, it didn't see the collection passed as second param. For this reason, older projects that contained @type were updated successfully but newer projects aren't.

since we don't want to store type on projects, I'm passing one payload as an object {data, collection}

Followup cleanups are required for all methods currently using db.update() of the mongo controller.

We may also have to optimize the controller methods determineDataType and discernCollectionFromType. This might also lead to their deprecation.

Copy link
Copy Markdown
Member

@thehabes thehabes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good and we will do an overall refactor for the collection dependency existing in /database/driver.mjs later. Waiting for confirmation of functional from @mepripri then this is good to go.

@mepripri
Copy link
Copy Markdown
Contributor

The change looks right, able to see the collaborators now
Screenshot 2025-02-10 at 1 46 21 PM

Added to the DB as well.
Screenshot 2025-02-10 at 1 56 25 PM

@git-voo git-voo merged commit 24c6123 into development Feb 10, 2025
@cubap cubap deleted the fix-db.update branch April 16, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants