refactor(auth): move discord handlers to own file

This commit is contained in:
2022-08-22 17:06:25 +01:00
parent 1f08ea12c0
commit bcdc4b83e6
4 changed files with 78 additions and 11 deletions

View File

View File

@@ -14,8 +14,13 @@ return new class extends Migration
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('discord_token')->after('remember_token');
$table->string('discord_refresh_token')->after('discord_token');
$table->string('password')->nullable()->change(); // social login requires no pw (still required upon normal reg)
$table->string('registrationIp')->nullable()->change();
$table->unsignedBigInteger('discord_user_id')->after('remember_token')->nullable();
$table->longText('discord_token')->after('discord_user_id')->nullable();
$table->longText('discord_refresh_token')->after('discord_token')->nullable();
});
}
@@ -27,7 +32,10 @@ return new class extends Migration
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('discord_token', 'discord_refresh_token');
$table->dropColumn('discord_token', 'discord_refresh_token', 'discord_user_id');
$table->string('password')->nullable(false)->change();
$table->string('registrationIp')->nullable(false)->change();
});
}
};