diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/category.go | 2 | ||||
-rw-r--r-- | api/entry.go | 8 | ||||
-rw-r--r-- | api/feed.go | 4 | ||||
-rw-r--r-- | api/icon.go | 2 | ||||
-rw-r--r-- | api/subscription.go | 2 | ||||
-rw-r--r-- | api/user.go | 8 |
6 files changed, 13 insertions, 13 deletions
diff --git a/api/category.go b/api/category.go index 30b12f4..b7b5c02 100644 --- a/api/category.go +++ b/api/category.go @@ -83,7 +83,7 @@ func (c *Controller) GetCategories(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, categories) + json.OK(w, r, categories) } // RemoveCategory is the API handler to remove a category. diff --git a/api/entry.go b/api/entry.go index a6785fb..b2a4d9d 100644 --- a/api/entry.go +++ b/api/entry.go @@ -48,7 +48,7 @@ func (c *Controller) GetFeedEntry(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, entry) + json.OK(w, r, entry) } // GetEntry is the API handler to get a single entry. @@ -73,7 +73,7 @@ func (c *Controller) GetEntry(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, entry) + json.OK(w, r, entry) } // GetFeedEntries is the API handler to get all feed entries. @@ -132,7 +132,7 @@ func (c *Controller) GetFeedEntries(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, &entriesResponse{Total: count, Entries: entries}) + json.OK(w, r, &entriesResponse{Total: count, Entries: entries}) } // GetEntries is the API handler to fetch entries. @@ -184,7 +184,7 @@ func (c *Controller) GetEntries(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, &entriesResponse{Total: count, Entries: entries}) + json.OK(w, r, &entriesResponse{Total: count, Entries: entries}) } // SetEntryStatus is the API handler to change the status of entries. diff --git a/api/feed.go b/api/feed.go index b7c46ea..b6b6357 100644 --- a/api/feed.go +++ b/api/feed.go @@ -146,7 +146,7 @@ func (c *Controller) GetFeeds(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, feeds) + json.OK(w, r, feeds) } // GetFeed is the API handler to get a feed. @@ -168,7 +168,7 @@ func (c *Controller) GetFeed(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, feed) + json.OK(w, r, feed) } // RemoveFeed is the API handler to remove a feed. diff --git a/api/icon.go b/api/icon.go index 0f5aa1b..052cdbc 100644 --- a/api/icon.go +++ b/api/icon.go @@ -37,7 +37,7 @@ func (c *Controller) FeedIcon(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, &feedIcon{ + json.OK(w, r, &feedIcon{ ID: icon.ID, MimeType: icon.MimeType, Data: icon.DataURL(), diff --git a/api/subscription.go b/api/subscription.go index 19adc9e..a28c3b2 100644 --- a/api/subscription.go +++ b/api/subscription.go @@ -36,5 +36,5 @@ func (c *Controller) GetSubscriptions(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, subscriptions) + json.OK(w, r, subscriptions) } diff --git a/api/user.go b/api/user.go index 4e5fa82..b880ba3 100644 --- a/api/user.go +++ b/api/user.go @@ -22,7 +22,7 @@ func (c *Controller) CurrentUser(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, user) + json.OK(w, r, user) } // CreateUser is the API handler to create a new user. @@ -119,7 +119,7 @@ func (c *Controller) Users(w http.ResponseWriter, r *http.Request) { } users.UseTimezone(ctx.UserTimezone()) - json.OK(w, users) + json.OK(w, r, users) } // UserByID is the API handler to fetch the given user by the ID. @@ -148,7 +148,7 @@ func (c *Controller) UserByID(w http.ResponseWriter, r *http.Request) { } user.UseTimezone(ctx.UserTimezone()) - json.OK(w, user) + json.OK(w, r, user) } // UserByUsername is the API handler to fetch the given user by the username. @@ -171,7 +171,7 @@ func (c *Controller) UserByUsername(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, user) + json.OK(w, r, user) } // RemoveUser is the API handler to remove an existing user. |