Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import Syncano from '@syncano/core'
export default (ctx) => {
const {channel, response} = new Syncano(ctx)
const {args} = ctx
try {
channel.publish(`global-messages`, {'light': args.light, 'status': args.status})
.then(res => {response(JSON.stringify(res), 200, 'application/json')})
} catch(e) {
console.log(e)
}
}
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.