Render article
This commit is contained in:
@@ -9,12 +9,12 @@ import (
|
||||
)
|
||||
|
||||
func HandleBlog(w http.ResponseWriter, r *http.Request) {
|
||||
blog_uuid := r.PathValue("uuid")
|
||||
slug := r.PathValue("slug")
|
||||
|
||||
var blog models.Blog
|
||||
_, err := core.DB.NewSelect().
|
||||
Model(&blog).
|
||||
Where("blog_id = ?", blog_uuid).
|
||||
Where("slug = ?", slug).
|
||||
Relation("Author").
|
||||
ScanAndCount(context.Background())
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user