Skip to content

Commit f558bc8

Browse files
committed
Correctly handle error; don't overwrite laravel method
1 parent 32fb21d commit f558bc8

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

app/Models/AuditLog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function server()
101101
*
102102
* @return $this
103103
*/
104-
public static function factory(string $action, array $metadata, bool $isSystem = false)
104+
public static function instance(string $action, array $metadata, bool $isSystem = false)
105105
{
106106
/** @var \Illuminate\Http\Request $request */
107107
$request = Container::getInstance()->make('request');

app/Models/Server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ public function mounts()
336336
*/
337337
public function newAuditEvent(string $action, array $metadata = []): AuditLog
338338
{
339-
return AuditLog::factory($action, $metadata)->fill([
339+
return AuditLog::instance($action, $metadata)->fill([
340340
'server_id' => $this->id,
341341
]);
342342
}

resources/scripts/components/server/backups/BackupContextMenu.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ export default ({ backup }: Props) => {
7171
console.error(error);
7272
clearAndAddHttpError({ key: 'backups', error });
7373
})
74-
.then(() => setLoading(false));
74+
.then(() => setLoading(false))
75+
.then(() => setModal(''));
7576
};
7677

7778
return (

0 commit comments

Comments
 (0)