mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-16 05:50:55 +08:00
clear icon cache after modify
This commit is contained in:
@@ -18,4 +18,9 @@ class CreateIcon extends CreateRecord
|
||||
'desc' => nexus_trans('label.icon.desc')
|
||||
];
|
||||
}
|
||||
|
||||
public function afterCreate()
|
||||
{
|
||||
clear_icon_cache();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,4 +28,9 @@ class EditIcon extends EditRecord
|
||||
'desc' => nexus_trans('label.icon.desc')
|
||||
];
|
||||
}
|
||||
|
||||
public function afterSave()
|
||||
{
|
||||
clear_icon_cache();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class Kernel extends HttpKernel
|
||||
'api' => [
|
||||
'throttle:api',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
\App\Http\Middleware\Platform::class,
|
||||
// \App\Http\Middleware\Platform::class,
|
||||
],
|
||||
'filament' => [
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
|
||||
@@ -17,7 +17,7 @@ class SecondIcon extends NexusModel
|
||||
foreach (SearchBox::$taxonomies as $torrentField => $taxonomyTableModel) {
|
||||
$mode = $data['mode'];
|
||||
if ($mode === null || empty($data[$torrentField][$mode])) {
|
||||
unset($data[$torrentField]);
|
||||
$data[$torrentField] = 0;
|
||||
} else {
|
||||
$data[$torrentField] = $data[$torrentField][$mode];
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ class AuthenticateRepository extends BaseRepository
|
||||
if (!$user || md5($user->secret . $password . $user->secret) != $user->passhash) {
|
||||
throw new \InvalidArgumentException('Username or password invalid.');
|
||||
}
|
||||
if (nexus()->isPlatformAdmin() && !$user->canAccessAdmin()) {
|
||||
throw new UnauthorizedException('Unauthorized!');
|
||||
}
|
||||
// if (nexus()->isPlatformAdmin() && !$user->canAccessAdmin()) {
|
||||
// throw new UnauthorizedException('Unauthorized!');
|
||||
// }
|
||||
$user->checkIsNormal();
|
||||
$tokenName = __METHOD__ . __LINE__;
|
||||
$token = DB::transaction(function () use ($user, $tokenName) {
|
||||
|
||||
Reference in New Issue
Block a user