Created
March 9, 2021 09:46
-
-
Save onedebos/569ea7bdb4adc79302fe22877e6b1a26 to your computer and use it in GitHub Desktop.
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
import pusher from './index' | |
export default function handler({ req, res }) { | |
// trigger a new post event via pusher | |
pusher.trigger("presence-channel", "location-update", { | |
username: req.body.userName, | |
location: req.body.location, | |
}); | |
res.json({ status: 200 }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment