Support deleting feed
This commit is contained in:
@@ -17,6 +17,11 @@ func (a *API) GetFeed(c *fiber.Ctx) error {
|
||||
return c.JSON(a.FeedStore.GetFeed(c.Params("id")))
|
||||
}
|
||||
|
||||
func (a *API) DeleteFeed(c *fiber.Ctx) error {
|
||||
a.FeedStore.DeleteFeed(c.Params("id"))
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *API) PostFeed(c *fiber.Ctx) error {
|
||||
url := ""
|
||||
if err := c.BodyParser(&url); err != nil {
|
||||
|
@@ -50,6 +50,7 @@ func Start(port string) error {
|
||||
app.Get("/api/feeds", api.GetFeeds)
|
||||
app.Post("/api/feeds", api.PostFeed)
|
||||
app.Get("/api/feed/:id", api.GetFeed)
|
||||
app.Delete("/api/feed/:id", api.DeleteFeed)
|
||||
app.Get("/api/item/:id", api.GetItem)
|
||||
app.Post("/api/item/:id/save", api.SaveItem)
|
||||
app.Get("/api/unread", api.GetUnread)
|
||||
|
Reference in New Issue
Block a user