Skip to content

Commit 9fd8a08

Browse files
committed
Revert some changes that cause issues with other URLs
1 parent 125856d commit 9fd8a08

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

app/Models/Server.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ class Server extends Model
9292
*/
9393
public function __construct()
9494
{
95-
if (!is_null(Auth::user())) {
96-
self::$user = Auth::user();
97-
} else {
98-
throw new \Exception('Auth::user and Dingo::user cannot both be null.');
99-
}
95+
self::$user = Auth::user();
10096
}
10197

10298
/**

app/Models/Subuser.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ class Subuser extends Model
7070
*/
7171
public function __construct()
7272
{
73-
if (!is_null(Auth::user())) {
74-
self::$user = Auth::user();
75-
} else {
76-
throw new \Exception('Auth::user and Dingo::user cannot both be null.');
77-
}
73+
self::$user = Auth::user();
7874
}
7975

8076
/**

0 commit comments

Comments
 (0)