Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Cosmic Blog tutorial - Social Links endpoint
// API endpoint for social links
server.get('/api/social-links', (req, res) => {
const params = {
type: 'social-links',
return bucket.getObjects(params)
.then(objects => res.send(objects))
.catch(err => res.status(404).json({
message: 'Error fetching social links',
error: err,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment