mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
update dependencies basic
This commit is contained in:
@@ -31,6 +31,7 @@ class Kernel extends ConsoleKernel
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
$schedule->command('cache:prune-stale-tags')->hourly();
|
||||
$schedule->command('exam:assign_cronjob')->everyMinute()->withoutOverlapping();
|
||||
$schedule->command('exam:checkout_cronjob')->everyFiveMinutes()->withoutOverlapping();
|
||||
$schedule->command('exam:update_progress --bulk=1')->hourly()->withoutOverlapping();
|
||||
|
||||
@@ -55,9 +55,9 @@ class Handler extends ExceptionHandler
|
||||
});
|
||||
|
||||
//Other Only handle in json request
|
||||
if (!request()->expectsJson()) {
|
||||
return;
|
||||
}
|
||||
// if (!request()->expectsJson()) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
$this->renderable(function (AuthenticationException $e) {
|
||||
return response()->json(fail($e->getMessage(), ['guards' => $e->guards()]), 401);
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ class Kernel extends HttpKernel
|
||||
protected $middleware = [
|
||||
// \App\Http\Middleware\TrustHosts::class,
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\Fruitcake\Cors\HandleCors::class,
|
||||
\Illuminate\Http\Middleware\HandleCors::class,
|
||||
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||
\App\Http\Middleware\TrimStrings::class,
|
||||
|
||||
@@ -23,9 +23,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
if (class_exists(Passport::class)) {
|
||||
Passport::ignoreMigrations();
|
||||
}
|
||||
do_action('nexus_register');
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerPolicies();
|
||||
// $this->registerPolicies();
|
||||
if (class_exists(Passport::class)) {
|
||||
Passport::useClientModel(OauthClient::class);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class CommentRepository extends BaseRepository
|
||||
$target->save();
|
||||
|
||||
$userUpdate = [
|
||||
'seedbonus' => DB::raw('seedbonus + ' . Setting::get('bonus.addcomment')),
|
||||
'seedbonus' => NexusDB::raw('seedbonus + ' . Setting::get('bonus.addcomment')),
|
||||
'last_comment' => Carbon::now(),
|
||||
];
|
||||
$user->update($userUpdate);
|
||||
|
||||
@@ -50,7 +50,7 @@ class DashboardRepository extends BaseRepository
|
||||
$result[$name] = [
|
||||
'name' => $name,
|
||||
'text' => nexus_trans("dashboard.system_info.$name"),
|
||||
'value' => DB::select(DB::raw('select version() as info'))[0]->info,
|
||||
'value' => NexusDB::select('select version() as info')[0]['info'],
|
||||
];
|
||||
// $name = 'os';
|
||||
// $result[$name] = [
|
||||
|
||||
@@ -486,7 +486,7 @@ class HitAndRunRepository extends BaseRepository
|
||||
|
||||
private function getCommentUpdateRaw($comment): \Illuminate\Database\Query\Expression
|
||||
{
|
||||
return DB::raw(sprintf("if (comment = '', '%s', concat('\n', '%s', comment))", $comment, $comment));
|
||||
return NexusDB::raw(sprintf("if (comment = '', '%s', concat('\n', '%s', comment))", $comment, $comment));
|
||||
}
|
||||
|
||||
private function getCanPardonStatus(): array
|
||||
|
||||
Reference in New Issue
Block a user