Created
January 14, 2019 20:49
-
-
Save ThePendulum/31a009f0ce15e09d2735398f8aa565e1 to your computer and use it in GitHub Desktop.
This file contains 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
async function assignModerator({ _commit }, { roomId, userId }) { | |
const res = await fetch(`${config.api.url}/rooms/${roomId}/moderators`, { | |
method: 'POST', | |
mode: 'cors', | |
credentials: 'same-origin', | |
body: JSON.stringify({ userId }), | |
}); | |
const moderators = await res.json(); | |
return moderators; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment