Skip to content

Commit

Permalink
filtering client based on the id given thru headers
Browse files Browse the repository at this point in the history
  • Loading branch information
abdollahis2 authored and abdollahis2 committed Jan 14, 2025
1 parent 17709a7 commit 460e6fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tr_sys/tr_ars/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,8 +915,8 @@ def subscribe(req):
already_complete=[]
data = json.loads(req.body)
pks= data['pks']
client_secret = data['client_secret']
client = get_object_or_404(Client.objects.filter(client_secret=client_secret))
client_id = req.headers.get('client_id')
client = get_object_or_404(Client.objects.filter(client_id=client_id))
for key in pks:
mesg = get_object_or_404(Message.objects.filter(pk=key))
if mesg.status in ('D','E'):
Expand Down

0 comments on commit 460e6fb

Please sign in to comment.