This file contains hidden or 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
| #### 3.5 Get events list (from version 0.2.3) | |
| ##### GET /events?start=1459964225556&end=1460137025556 | |
| Query params: | |
| ```sh | |
| start - start date as timestamp - (new Date()).getTime() | |
| end - end date as timestamp - (new Date()).getTime() | |
| ``` | |
| Response (status: 200): |
This file contains hidden or 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
| 1)// Logics using Promises | |
| function sendSmsCustom (params, provider){ | |
| var deferred = q.defer(); | |
| var data; // value for store validated params | |
| validateCustomSmsParams(params) | |
| .then(function(validated){ | |
| data = validated; | |
| return findDataByPrefixAndId(data.prefix, data.id) | |
| }) |
This file contains hidden or 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
| <script src="/js/jquery-ui-1.10.3.custom/js/jquery-1.9.1.min.js"></script> | |
| <script src="/js/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js"></script> | |
| <script> | |
| $(document).ready(function (){ | |
| $('.autosuggest').autocomplete({ | |
| source: function(request, response){ | |
| $.getJSON($(this)[0].element.attr('data-source')+"/"+ encodeURIComponent(request.term),response); | |
| }, // Страница для обработки запросов автозаполнения | |
| minLength: 2, // Минимальная длина запроса для срабатывания автозаполнения | |
| zIndex: 99999, |
This file contains hidden or 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 isomorphicFetch from 'isomorphic-fetch'; | |
| import {getStore} from '../store/configureStore'; | |
| import * as types from '../actions/types'; | |
| const baseUrl = __CLIENT__ ? __CONFIG__.api.url : __CONFIG__.server.url; | |
| function getAuthHeader() { | |
| const user = getStore().getState().currentUser; | |
| if (user && user.token){ | |
| return getStore().getState().currentUser.token; |