-
-
Save Mattchewone/635286bc0bc92fbe1b1c23dcbd4b9e98 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
class RoomMembershipService { | |
async create (data, params) { | |
if (params.connection) { | |
this.app.channel(`room/${data.roomId}`).join(params.connection) | |
} | |
return data; | |
} | |
async remove (id, params) { | |
if (params.connection) { | |
this.app.channel(`room/${id}`).leave(params.connection) | |
} | |
return { id }; | |
} | |
setup (app) { | |
this.app = app; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment