Commit 4accee34 authored by zauberstuhl's avatar zauberstuhl

Remove 500 and return NotFound

parent e4514beb
......@@ -18,7 +18,6 @@ package controllers
//
import (
"net/http"
"github.com/revel/revel"
"gopkg.in/ganggo/ganggo.v0/app/models"
)
......@@ -36,8 +35,8 @@ func (l ApiLike) Index() revel.Result {
l.Params.Bind(&postID, "id")
err := likes.FindByPostID(postID)
if err != nil {
l.Response.Status = http.StatusInternalServerError
revel.ERROR.Println(err)
return l.NotFound("Post not found")
}
return l.RenderJson(likes)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment