Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.