@action.bound async addPrank(prank) { try { await axios.post('http://localhost:8080/chaos/pranks/execute', prank); console.log('Prank Added Successfully'); } catch (e) { console.log('Error Adding Prank', e); } }
@action.bound setSearchText(text: string): void { if (this.routerStore.route == null) { return; } const search = (text != null && text.length > 0) ? text : null; this.routerStore.router.navigate(this.routerStore.route.name, { search }, { replace: true, reload: true }) }
@action.bound async fetchAddresses() { try { this.isLoading = true; await this.props.authStore.info.getAddresses(); this.isLoading = false; } catch (error) { console.log('error', error); } }
@action.bound async saveAddress() { this.isSaving = true; try { await this.props.save(this.address); } catch (error) { console.log('error', error); } }
@action.bound searchAddress(value) { this.props.navigation.goBack(null); const address = buildAddress(value); this.address = address; }
@action.bound async addTodo(todo: CreateTodoEntity) { const addedTodo = await this.service.create(todo); this._todos.push(addedTodo); }
@action.bound decrementCount(value = 1) { console.log("decrementCount"); this.count -= value; }
@action.bound async getSinglePranksList() { try { const res = await axios.get('http://localhost:8080/chaos/pranks/definition'); this.singlePranks = res.data; } catch (e) { console.log('Error getting pranks list', e); } }
// update sort field @action.bound setSortField(field) { this.sortField = field; }
@action.bound setURL(newURL) { this.URL = newURL; console.log('NEW URL', newURL); }
@action.bound setSearchText(text: string): void { if (this.routerStore.route == null) { return; } const search = (text != null && text.length > 0) ? text : null; this.routerStore.router.navigate(this.routerStore.route.name, { search }, { replace: true, reload: true }) }
@action.bound async addTodo(todo: CreateTodoEntity) { const addedTodo = await this.service.create(todo); this._todos.push(addedTodo); }
@action.bound async getSinglePranksList() { try { const res = await axios.get('http://localhost:8080/chaos/pranks/definition'); this.singlePranks = res.data; } catch (e) { console.log('Error getting pranks list', e); } }
@action.bound async addPrank(prank) { try { await axios.post('http://localhost:8080/chaos/pranks/execute', prank); console.log('Prank Added Successfully'); } catch (e) { console.log('Error Adding Prank', e); } }
@action.bound setURL(newURL) { this.URL = newURL; console.log('NEW URL', newURL); }