Created
April 21, 2015 20:30
-
-
Save wunki/188deb60699e90918340 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FindOne returns a single thread in the API | |
func (a *AppContext) FindOne(c *echo.Context) error { | |
id := c.P(0) | |
thread, err := a.ThreadStorage.FindOne(id) | |
if err != nil { | |
return c.JSON(http.StatusNotFound, nil) | |
} | |
return c.JSON(http.StatusOK, thread) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment