Initial take on bookmarks

This commit is contained in:
Dan Sosedoff
2014-12-02 22:19:38 -06:00
parent 403701b258
commit 8fae96dcbd
3 changed files with 89 additions and 0 deletions

11
api.go
View File

@@ -198,6 +198,17 @@ func API_HandleQuery(query string, c *gin.Context) {
c.JSON(200, result)
}
func API_Bookmarks(c *gin.Context) {
bookmarks, err := readAllBookmarks()
if err != nil {
c.JSON(400, NewError(err))
return
}
c.JSON(200, bookmarks)
}
func API_ServeAsset(c *gin.Context) {
file := fmt.Sprintf(
"static/%s/%s",