Skip to content

Commit 77ef58c

Browse files
authored
Merge pull request #2 from erjanmx/json-response
Response with json
2 parents 63b8f10 + 6733a6a commit 77ef58c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Middleware/CheckAuth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class CheckAuth
2020
public function handle($request, Closure $next, $service)
2121
{
2222
if (! $this->authorized($request, $service)) {
23-
return response(self::CODE, self::MESSAGE);
23+
return response()->json(['message' => self::MESSAGE], self::CODE);
2424
}
2525

2626
return $next($request);

0 commit comments

Comments
 (0)