aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-04-30 15:23:38 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-04-30 15:23:38 +0200
commit1bae1dfcbc4a5f590c51103635006198ae6a91d6 (patch)
treec838e9e7e18342c01e3c3b46c8e9ca4b74895e3b /src/stores/ServicesStore.js
parentUpdate CHANGELOG.md (diff)
downloadferdium-app-1bae1dfcbc4a5f590c51103635006198ae6a91d6.tar.gz
ferdium-app-1bae1dfcbc4a5f590c51103635006198ae6a91d6.tar.zst
ferdium-app-1bae1dfcbc4a5f590c51103635006198ae6a91d6.zip
Enforce service limit
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 13f929c2f..349de2c9b 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -13,6 +13,7 @@ import CachedRequest from './lib/CachedRequest';
13import { matchRoute } from '../helpers/routing-helpers'; 13import { matchRoute } from '../helpers/routing-helpers';
14import { gaEvent, statsEvent } from '../lib/analytics'; 14import { gaEvent, statsEvent } from '../lib/analytics';
15import { workspaceStore } from '../features/workspaces'; 15import { workspaceStore } from '../features/workspaces';
16import { serviceLimitStore } from '../features/serviceLimit';
16 17
17const debug = require('debug')('Franz:ServiceStore'); 18const debug = require('debug')('Franz:ServiceStore');
18 19
@@ -164,6 +165,8 @@ export default class ServicesStore extends Store {
164 165
165 // Actions 166 // Actions
166 @action async _createService({ recipeId, serviceData, redirect = true }) { 167 @action async _createService({ recipeId, serviceData, redirect = true }) {
168 if (serviceLimitStore.userHasReachedServiceLimit) return;
169
167 const data = this._cleanUpTeamIdAndCustomUrl(recipeId, serviceData); 170 const data = this._cleanUpTeamIdAndCustomUrl(recipeId, serviceData);
168 171
169 const response = await this.createServiceRequest.execute(recipeId, data)._promise; 172 const response = await this.createServiceRequest.execute(recipeId, data)._promise;