Merge pull request #79 from expsa/samir-aladawi-fix-fcm-send-api-body

[FIX] odex_web_app: fix fcm api body
This commit is contained in:
SamirLADOUI-sa 2024-07-07 09:59:03 +01:00 committed by GitHub
commit 12814a654c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,10 @@ class HrEmployee(models.Model):
body = json.dumps({
"to": self.fcm_token_web,
"direct_boot_ok": True,
"notification": notification
"notification": {
"title": "Message",
"body": notification
}
})
try:
respons = requests.post(url=url, data=body, headers=header)