Correção no endpoint notify

This commit is contained in:
marcio1002 2023-12-13 19:01:27 -03:00
parent fc644fa221
commit 00c0181dce
2 changed files with 6 additions and 4 deletions

View File

@ -62,6 +62,6 @@ class NotificationController extends Controller
{
$response = $this->notification->getNotify();
return ResponseJson::data($response);
return response()->json($response);
}
}

View File

@ -17,7 +17,9 @@ class NotificationRepository extends AbstractRepository implements NotificationC
public function getNotify(): int
{
return Notifications::query()->with('users')
->whereRelation('users', 'id', '=', auth()->id())->count();
return Notifications::query()
->with('users')
->whereRelation('users', 'id', '=', auth()->id())
->count();
}
}