-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5196 from reactioncommerce/feat-aldeed-4268-colle…
…ctions-config feat: define collections using registerPlugin
- Loading branch information
Showing
110 changed files
with
3,550 additions
and
3,766 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
import { MongoInternals } from "meteor/mongo"; | ||
import { NoMeteorMedia } from "/imports/plugins/core/files/server"; | ||
import defineCollections from "/imports/node-app/core/util/defineCollections"; | ||
const collections = {}; | ||
|
||
const collections = { Media: NoMeteorMedia }; | ||
|
||
const { db } = MongoInternals.defaultRemoteCollectionDriver().mongo; | ||
defineCollections(db, collections); | ||
/** | ||
* @summary Use this to set the raw collections after all plugins | ||
* have been registered. | ||
* @param {Object} registeredCollections Collections map | ||
* @return {undefined} | ||
*/ | ||
export function setCollections(registeredCollections) { | ||
for (const name in registeredCollections) { | ||
if ({}.hasOwnProperty.call(registeredCollections, name)) { | ||
collections[name] = registeredCollections[name]; | ||
} | ||
} | ||
} | ||
|
||
export default collections; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.