Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (10 sloc) 356 Bytes
API /posts/{slug}/api
* slug : string - Return post with this slug name
{{ `SELECT *
FROM Post p INNER JOIN UserInfo u on p.CreatedBy = u.UserName
WHERE Slug = @slug
ORDER BY p.Created DESC`
| dbSingle({ slug })
| assignTo: post }}
{{ post ?? httpResult({ status:404, statusDescription:'Post was not found' })
| return }}