Skip to content

Commit fdb9b56

Browse files
committed
fix: changed display order
1 parent 6f7c252 commit fdb9b56

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Exceptions/Handler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function register(): void
3232
protected function unauthenticated($request, AuthenticationException $exception)
3333
{
3434
if ($request->expectsJson() || strpos($request->getRequestUri(), '/api/') !== false) {
35-
return response()->json(['success' => false, 'message' => 'Unauthenticated.', 'timestamp' => time()], 401);
35+
return response()->json(['success' => false, 'message' => 'Unauthenticated.', 'timestamp' => time() ], 401);
3636
}
3737

3838
return redirect()->guest(route('login'));

app/Http/Controllers/LinkController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function doesExistShortLink(string $short_url)
7979
public function getLinksfFromUser(int $userId)
8080
{
8181
$data = Link::select('id', 'long_url', 'short_url', 'created_at')->where('ownerId', $userId)
82-
->orderBy('created_at', 'asc')
82+
->orderBy('created_at', 'desc')
8383
->get();
8484

8585
return $data;

0 commit comments

Comments
 (0)