diff options
| author | Georgios Andreadis <G.Andreadis@student.tudelft.nl> | 2017-01-27 10:26:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-27 10:26:54 +0100 |
| commit | 50fcb0634c9ebe894988103184d50d372bc76907 (patch) | |
| tree | 5af172c03599f7c680cd32205eab5329b841c85c /src/scripts/controllers/connection/socket.ts | |
| parent | 3ad08353d289720cf8f43e1dba078da43c35e97d (diff) | |
| parent | b462c9183ec7c2e41f14daad49f03d8afaa4ec59 (diff) | |
Merge pull request #4 from tudelft-atlarge/states-batch-fetch
Fetch experiment states in one batch
Diffstat (limited to 'src/scripts/controllers/connection/socket.ts')
| -rw-r--r-- | src/scripts/controllers/connection/socket.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scripts/controllers/connection/socket.ts b/src/scripts/controllers/connection/socket.ts index b38c303f..c23495f1 100644 --- a/src/scripts/controllers/connection/socket.ts +++ b/src/scripts/controllers/connection/socket.ts @@ -19,7 +19,7 @@ export class SocketController { this._socket.on('connect', onConnect); this._socket.on('response', (jsonResponse: string) => { - let response: IResponse = JSON.parse(jsonResponse); + const response: IResponse = JSON.parse(jsonResponse); console.log("Response, ID:", response.id, response); this.callbacks[response.id](response); delete this.callbacks[response.id]; @@ -34,7 +34,7 @@ export class SocketController { */ public sendRequest(request: IRequest, callback: (response: IResponse) => any): void { // Check local cache, in case request is for cachable GET route - let cacheStatus = this._cacheController.checkCache(request); + const cacheStatus = this._cacheController.checkCache(request); if (cacheStatus === CacheStatus.HIT) { callback({ @@ -73,4 +73,4 @@ export class SocketController { SocketController.id++; } } -}
\ No newline at end of file +} |
