<commit_before><?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Config;
use Astro\Renderer\Base\SingleDefinitionsFolderLocator;
use Astro\Renderer\Engines\TwigEngine;
use Astro\Renderer\AstroRenderer;
use App\Models\LocalAPIClient;
use Illuminate\Http\Request;
use App\Models\Page;
use App\Http\Controllers\PageController;

// Authentication routes
$this->get('auth/login', 'Auth\AuthController@login')->name('auth.login');
$this->post('auth/login', 'Auth\AuthController@loginLocal');
$this->get('auth/sso/respond', 'Auth\AuthController@loginSSO')->name('auth.sso.respond');
$this->post('auth/logout', 'Auth\AuthController@logout')->name('auth.logout');

// Preview draft pages in editor.
Route::get('/draft/{host}/{path?}', 'PageController@draft')
	->where('host', '([^/]+)')
	->where('path', '(.*?)/?')
	->middleware('auth');

// "Preview" published pages in editor.
Route::get('/published/{host}/{path?}', 'PageController@published')
	->where('host', '([^/]+)')
	->where('path', '(.*?)/?');

// SPA wrapper
Route::get('/{catchall?}', function($route = '') {
	$user = Auth::user();
	// TODO: grab user info from endpoint, rather than inline js
	return response()->view('inline', [
		'route'      => $route,
		'is_preview' => starts_with($route, 'preview/'),
		'user'       => $user->name,
		'api_token'  => $user->api_token
	]);
})
->where('catchall', '(.*)')
->middleware('auth');
<commit_msg>Setting username var to actually be the username, adding in user var if we want the user realname<commit_after><?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Config;
use Astro\Renderer\Base\SingleDefinitionsFolderLocator;
use Astro\Renderer\Engines\TwigEngine;
use Astro\Renderer\AstroRenderer;
use App\Models\LocalAPIClient;
use Illuminate\Http\Request;
use App\Models\Page;
use App\Http\Controllers\PageController;

// Authentication routes
$this->get('auth/login', 'Auth\AuthController@login')->name('auth.login');
$this->post('auth/login', 'Auth\AuthController@loginLocal');
$this->get('auth/sso/respond', 'Auth\AuthController@loginSSO')->name('auth.sso.respond');
$this->post('auth/logout', 'Auth\AuthController@logout')->name('auth.logout');

// Preview draft pages in editor.
Route::get('/draft/{host}/{path?}', 'PageController@draft')
	->where('host', '([^/]+)')
	->where('path', '(.*?)/?')
	->middleware('auth');

// "Preview" published pages in editor.
Route::get('/published/{host}/{path?}', 'PageController@published')
	->where('host', '([^/]+)')
	->where('path', '(.*?)/?');

// SPA wrapper
Route::get('/{catchall?}', function($route = '') {
	$user = Auth::user();
	// TODO: grab user info from endpoint, rather than inline js
	return response()->view('inline', [
		'route'      => $route,
		'is_preview' => starts_with($route, 'preview/'),
		'user'       => $user->name,
		'username'   => $user->username,
		'api_token'  => $user->api_token
	]);
})
->where('catchall', '(.*)')
->middleware('auth');

{'fraction_non_alphanumeric': 0.2682926829268293, 'fraction_numerical': 0.0, 'mean_word_length': 3.4323040380047507, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4461562', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1135, 'n_words': 239}