diff options
| -rw-r--r-- | README.md | 10 | ||||
| -rwxr-xr-x | database/migrations/0001_01_01_000000_create_users_table.php | 2 | ||||
| -rw-r--r-- | public/main.js | 6 |
3 files changed, 13 insertions, 5 deletions
@@ -1,5 +1,11 @@ - - +status 1/7: working on sessiontableview idea. it's printing out json of table. + next: - going to add user roles so that only admin can view all sessions + - form view + - websockets client using external nodejs server + +later plans: + - laravel websockets (reverb, event streaming) + - inventory stuff https://laravel.com/api/11.x/ diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index 345b1bf..550efcd 100755 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -17,7 +17,7 @@ return new class extends Migration $table->string('email')->nullable()->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); - $table->integer('privilege')->default(10); + $table->tinyInteger('role')->default(1); $table->string('description')->nullable(); $table->rememberToken(); $table->timestamps(); diff --git a/public/main.js b/public/main.js index b2b6a92..e94f1e7 100644 --- a/public/main.js +++ b/public/main.js @@ -187,6 +187,7 @@ function updateProgress(currentChunk, totalChunks) { function connectWebSocket(){ try { + socket = io(env['WS_URL'], { secure: true, rejectUnauthorized: false @@ -224,7 +225,7 @@ function connectWebSocket(){ }); //sync data from server. this is the data from server that should be replicated on each client - /*socket.on('sync_data', (data) => { + socket.on('sync_data', (data) => { //data is a map of client id to client payload data (currently just the screen position) friends = {}; for (const cid in data){ @@ -234,9 +235,10 @@ function connectWebSocket(){ friends[cid] = data[cid]; } domElems.numConnected.innerHTML = Object.keys(friends).length + 1; - });*/ + }); return true; } catch (err) { + console.log(`failed to connec WS ${env['WS_URL']}`) console.error(err); return false; } |
