feat:add remider for response
This commit is contained in:
@@ -486,9 +486,22 @@ public function profile(Request $request)
|
|||||||
if ($response->successful()) {
|
if ($response->successful()) {
|
||||||
$user = $this->syncUserFromStatus($response->json(), $user);
|
$user = $this->syncUserFromStatus($response->json(), $user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$remindersResponse = Http::acceptJson()
|
||||||
|
->withToken($data['token'])
|
||||||
|
->get('https://api.approagency.ir/api/reminders', [
|
||||||
|
'type' => 'reminder',
|
||||||
|
'package_name' => $data['package_name'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$reminders = $remindersResponse->successful()
|
||||||
|
? $remindersResponse->json()
|
||||||
|
: [];
|
||||||
|
|
||||||
$user->load(['breathingSessions.template']);
|
$user->load(['breathingSessions.template']);
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'user' => $user
|
'user' => $user,
|
||||||
|
'reminders' => $reminders,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
public function status(Request $request)
|
public function status(Request $request)
|
||||||
|
|||||||
Reference in New Issue
Block a user