Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
app_push
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_server
app_push
Commits
8def2ba4
Commit
8def2ba4
authored
Jul 14, 2021
by
万从磊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix_push_v2' into 'master'
推送判断client_id See merge request
!10
parents
d50f3f68
63880dad
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
app/controllers/pushs_controller.rb
+4
-2
No files found.
app/controllers/pushs_controller.rb
View file @
8def2ba4
...
...
@@ -27,8 +27,10 @@ class PushsController < ApplicationController
user_ids
=
params
[
:user_ids
]
rescue
[]
user_device_exist
=
UserDevice
.
where
(
user_id:
user_ids
).
exists?
user_devices
=
UserDevice
.
where
(
user_id:
user_ids
)
client_id
=
message
.
dig
(
'transmission_content'
,
'extras'
,
'extra'
,
'client_id'
)
user_devices
=
user_devices
.
where
.
not
(
client_id:
client_id
)
if
client_id
user_device_exist
=
user_devices
.
exists?
unless
user_device_exist
return
render
json:
{
code:
-
1
,
message:
'user_device找不到,user_ids错误'
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment