Add more API resources; user bid management and tests #35 #36

This commit is contained in:
Nabeel Shahzad
2017-12-12 16:58:27 -06:00
parent 5b25a464ba
commit 248a8d1488
27 changed files with 470 additions and 166 deletions

View File

@@ -18,7 +18,7 @@ class CreateUsersTable extends Migration
$table->string('name')->nullable();
$table->string('email')->unique();
$table->string('password');
$table->string('apikey', 40)->nullable();
$table->string('api_key', 40)->nullable();
$table->unsignedInteger('airline_id');
$table->unsignedInteger('rank_id');
$table->string('home_airport_id', 5)->nullable();
@@ -34,7 +34,7 @@ class CreateUsersTable extends Migration
$table->softDeletes();
$table->index('email');
$table->index('apikey');
$table->index('api_key');
});
// Create table for storing roles

View File

@@ -65,7 +65,7 @@ class CreateSettingsTable extends Migration
'key' => 'bids.disable_flight_on_bid',
'value' => true,
'type' => 'boolean',
'description' => 'When a flight is bid on, should the flight be shown',
'description' => 'When a flight is bid on, no one else can bid on it',
],
[
'order' => 21,

View File

@@ -13,6 +13,7 @@ users:
name: Admin User
email: admin@phpvms.net
password: admin
api_key: testadminapikey
airline_id: 1
rank_id: 1
home_airport_id: KAUS
@@ -26,6 +27,7 @@ users:
name: Carla Walters
email: carla.walters68@example.com
password: admin
api_key: testuserapikey1
airline_id: 1
rank_id: 1
home_airport_id: KJFK
@@ -39,6 +41,7 @@ users:
name: Raymond Pearson
email: raymond.pearson56@example.com
password: admin
api_key: testuserapikey2
airline_id: 1
rank_id: 1
home_airport_id: KJFK