Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit aacaef03
authored
Jun 02, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix CheckCampaignsChanges
1 parent
f3fa934d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
app/Service/Requests/Direct/CheckCampaignsChanges.php
app/Service/Requests/Direct/CheckCampaignsChanges.php
View file @
aacaef0
...
...
@@ -8,7 +8,7 @@ use App\Models\Pivots\DictionaryCampaign;
use
App\Service\Requests\DirectRequest
;
use
Carbon\Carbon
;
class
CheckCampaignsChange
s
extends
DirectRequest
class
CheckCampaignsChange
extends
DirectRequest
{
CONST
SELF
=
'SELF'
;
CONST
CHILDREN
=
'CHILDREN'
;
...
...
@@ -25,6 +25,7 @@ class CheckCampaignsChanges extends DirectRequest
function
handle
(
$response
)
{
if
(
isset
(
$response
[
'result'
][
'Campaigns'
]))
{
foreach
(
$response
[
'result'
][
'Campaigns'
]
as
$campaign_data
)
{
if
(
in_array
(
self
::
SELF
,
$campaign_data
[
'ChangesIn'
])
||
in_array
(
self
::
CHILDREN
,
$campaign_data
[
'ChangesIn'
]))
{
$data
=
[];
...
...
@@ -60,8 +61,10 @@ class CheckCampaignsChanges extends DirectRequest
}
}
}
}
$this
->
getToken
()
->
update
([
'check_changes_campaign'
=>
Carbon
::
createFromTimestamp
(
$response
[
'result'
][
'Timestamp'
]),
'check_changes_campaign'
=>
Carbon
::
parse
(
$response
[
'result'
][
'Timestamp'
]),
]);
$this
->
setToken
(
$this
->
getToken
()
->
refresh
());
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment