Return all non-private snippets together with some information about the user. Example response:
[
{
"id": 1,
"created_at": "...",
"title": "avg.js",
"contents": "console.log('1')",
"is_private": false,
"user": {
"id": 1,
"first_name": "Orhan",
"last_name": "Toy"
}
}
]
Return a single snippet. Example response:
{
"id": 1,
"created_at": "...",
"title": "avg.js",
"contents": "console.log('1')",
"is_private": true,
"user": {
"id": 1,
"first_name": "Orhan",
"last_name": "Toy",
}
}
Not found: we respond with a 404 if the snippet with the given ID cannot be found.