Add websiteHostname to LinkCodes

This commit is contained in:
Daniel_I_Am 2020-08-29 16:33:16 +02:00
parent d5f228f226
commit 7c595f3f92
No known key found for this signature in database
GPG Key ID: 80C428FCC9743E84
3 changed files with 4 additions and 0 deletions

View File

@ -150,6 +150,7 @@ class LodestoneLinkController extends Controller
);
$linkCode = LinkCode::create([
'lodestoneId' => $character['Character']['ID'],
'websiteHostname' => $hostname,
'websiteUserId' => $websiteUserId,
'expires' => $expirationTime,
'code' => $code
@ -195,6 +196,7 @@ class LodestoneLinkController extends Controller
);
$linkCode = LinkCode::create([
'lodestoneId' => $character['Character']['ID'],
'websiteHostname' => $hostname,
'websiteUserId' => $websiteUserId,
'expires' => $expirationTime,
'code' => $code

View File

@ -11,6 +11,7 @@ class LinkCode extends Model
protected $fillable = [
'lodestoneId',
'discordUserId',
'websiteHostname',
'websiteUserId',
'expires',
'code'

View File

@ -17,6 +17,7 @@ class CreateLinkCodesTable extends Migration
$table->id();
$table->bigInteger('lodestoneId')->unsigned()->unique();
$table->bigInteger('discordUserId')->unsigned()->nullable();
$table->string('websiteHostname', 255)->nullable();
$table->bigInteger('websiteUserId')->unsigned()->nullable();
$table->dateTime('expires');
$table->string('code', 128);