-
-
Save EkaanshArora/08ea30f0b741b8064e5c80eccc7c145e to your computer and use it in GitHub Desktop.
node token blog - 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
let uid = req.params.uid; | |
if(!uid || uid === '') { | |
return resp.status(500).json({ 'error': 'uid is required' }); | |
} | |
// get role | |
let role; | |
if (req.params.role === 'publisher') { | |
role = RtcRole.PUBLISHER; | |
} else if (req.params.role === 'audience') { | |
role = RtcRole.SUBSCRIBER | |
} else { | |
return resp.status(500).json({ 'error': 'role is incorrect' }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment