forked from Alex/Pterodactyl-Panel
Correctly handle error; don't overwrite laravel method
This commit is contained in:
parent
32fb21d0b7
commit
f558bc880a
@ -101,7 +101,7 @@ class AuditLog extends Model
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public static function factory(string $action, array $metadata, bool $isSystem = false)
|
||||
public static function instance(string $action, array $metadata, bool $isSystem = false)
|
||||
{
|
||||
/** @var \Illuminate\Http\Request $request */
|
||||
$request = Container::getInstance()->make('request');
|
||||
|
@ -336,7 +336,7 @@ class Server extends Model
|
||||
*/
|
||||
public function newAuditEvent(string $action, array $metadata = []): AuditLog
|
||||
{
|
||||
return AuditLog::factory($action, $metadata)->fill([
|
||||
return AuditLog::instance($action, $metadata)->fill([
|
||||
'server_id' => $this->id,
|
||||
]);
|
||||
}
|
||||
|
@ -71,7 +71,8 @@ export default ({ backup }: Props) => {
|
||||
console.error(error);
|
||||
clearAndAddHttpError({ key: 'backups', error });
|
||||
})
|
||||
.then(() => setLoading(false));
|
||||
.then(() => setLoading(false))
|
||||
.then(() => setModal(''));
|
||||
};
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user