Last active
January 12, 2018 14:32
-
-
Save prinzdezibel/dd9e593044fb9a0c3d32b173aa4684ae to your computer and use it in GitHub Desktop.
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
import { SimpleSchema } from "meteor/aldeed:simple-schema"; | |
import { Product } from "/lib/collections/schemas/index"; | |
import { Products } from "/lib/collections/index"; | |
import { getSchemas, registerSchema } from "@reactioncommerce/reaction-collections"; | |
const ExtendedSchema = new SimpleSchema([ | |
Product, | |
{ | |
featuredProductLabel: { | |
optional: true, | |
type: String | |
} | |
} | |
]); | |
Products.attachSchema(ExtendedSchema, { replace: true, selector: { type: "simple" } }); | |
registerSchema("Product", ExtendedSchema); | |
const Schemas = getSchemas(); | |
const ExtendedFilters = new SimpleSchema([ | |
Schemas.filters, | |
{ | |
featuredProductLabel: { | |
optional: true, | |
type: String | |
} | |
} | |
]); | |
registerSchema("filters", ExtendedFilters); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment