IEEE-VIT / enigma8-backend

Backend for Enigma 8.0

Home Page:https://enigma8-api.ieeevit.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

update: addFCM route

aaryankotharii opened this issue · comments

add os parameter to the request body.
values can be android, ios, web

{
    token : abcde,
    os: android/ios/web
}

store the same in db as well.

Will there will multiple token for a single os?

[
{token,os}
]
or
{[token],os}

@aaryankotharii

@anshulagx the latter.
{[token],os}

@IEEE-VIT/enigma-ios send iOS as os
@IEEE-VIT/enigma-android send android as os
@IEEE-VIT/enigma-frontend send web as os

each user object will have one OS, which will never change, correct? @aaryankotharii
If this is the case, then shouldn't it be updated in createUser? instead of addFCm which will be called several times.

@anshulagx do one thing make it this only

[
{token,os}
]

so for example if iOS user logs in from web we match web token to web os.