Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- startQuery() {
- return Promise.all([
- this._createCampaign(this.$models),
- this._createCreative(this.$models),
- ]).then(resps => {
- this.setStore('campaign', resps[0]);
- this.setStore('creative', resps[1]);
- return this._createStrategy(this.$models, this.$store)
- }).then(strategy => {
- this.setStore('strategy', strategy);
- return Promise.all([
- this._attachCreativeToStrategy(this.$store),
- this._setLocationTargeting(this.$models, this.$store),
- this._setDeviceTargeting(this.$models, this.$store),
- this._setBrowserTargeting(this.$models, this.$store),
- this._setOsTargeting(this.$models, this.$store),
- this._setContextualTargeting(this.$models, this.$store),
- this._createSiteList(this.$models, this.$store)
- .then(siteList => this._attachSiteList({ siteList }, this.$store)),
- this._createKeywordList(this.$models, this.$store)
- .then(keywordList => this._attachKeywordList({ keywordList }, this.$store)),
- ]);
- }).then(attachedCreatives => {
- this.setStore('attachedCreatives', attachedCreatives);
- return this.$store;
- })
- }
Add Comment
Please, Sign In to add comment