Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:Webinate/users into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
MKHenson committed Oct 18, 2016
2 parents 8033dae + 01a5abf commit b026d8c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion install-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

# Functiom that prints the latest stable version
version() {
echo "0.4.0"
echo "0.4.1"
}

echo "Downloading latest version from github $(version)"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webinate-users",
"version": "0.4.0",
"version": "0.4.1",
"description": "The server side code for App Engine. ",
"main": "gulpfile.js",
"author": "Mathew Henson",
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ server with a RESTful API that allows you to interact with the underlying functi
Node Package Manager (NPM) and a running instance of mongoDB

## Current stable version
* Version 0.4.0
* Version 0.4.1

## Requirements
* [MongoDB v3](https://www.mongodb.com/)
Expand Down Expand Up @@ -41,7 +41,7 @@ sudo curl -o- https://raw.githubusercontent.com/Webinate/users/dev/install-scrip

4) Now build the project with gulp

gulp build-all
gulp build

This will create a dist folder that contains the built application. But we still need to add the dependencies that
the application itself requires.
Expand Down
2 changes: 1 addition & 1 deletion src/dist-files/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webinate-users",
"version": "0.4.0",
"version": "0.4.1",
"description": "User management helper for the webinate product range",
"main": "server/Main.js",
"repository": {
Expand Down
9 changes: 6 additions & 3 deletions src/socket-api/comms-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ export class CommsController extends events.EventEmitter {
CommsController.singleton = this;
this._connections = [];
this._cfg = cfg;
this._hashedApiKey = bcrypt.hashSync( cfg.websocket.socketApiKey );


}

/**
Expand Down Expand Up @@ -163,6 +160,12 @@ export class CommsController extends events.EventEmitter {
async initialize(): Promise<void> {
let cfg = this._cfg;

// Throw error if no socket api key
if ( !cfg.websocket.socketApiKey )
throw new Error( 'The socketApiKey was not set in the config file. Make sure it exists (Check the example-config.json) ' );

this._hashedApiKey = bcrypt.hashSync( cfg.websocket.socketApiKey );

// dummy request processing - this is not actually called as its handed off to the socket api
const processRequest = function( req, res ) {
req; // Suppress compiler warning
Expand Down
2 changes: 1 addition & 1 deletion test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webinate-users-tests",
"version": "0.4.0",
"version": "0.4.1",
"description": "Tests each of the functions for the users API and web socket endpoints",
"main": "tests.js",
"author": "Mathew Henson",
Expand Down

0 comments on commit b026d8c

Please sign in to comment.