|
@@ -29,12 +29,14 @@ func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool, feedHa
|
|
|
sr.HandleFunc("/users/{userID:[0-9]+}", handler.userByID).Methods(http.MethodGet)
|
|
sr.HandleFunc("/users/{userID:[0-9]+}", handler.userByID).Methods(http.MethodGet)
|
|
|
sr.HandleFunc("/users/{userID:[0-9]+}", handler.updateUser).Methods(http.MethodPut)
|
|
sr.HandleFunc("/users/{userID:[0-9]+}", handler.updateUser).Methods(http.MethodPut)
|
|
|
sr.HandleFunc("/users/{userID:[0-9]+}", handler.removeUser).Methods(http.MethodDelete)
|
|
sr.HandleFunc("/users/{userID:[0-9]+}", handler.removeUser).Methods(http.MethodDelete)
|
|
|
|
|
+ sr.HandleFunc("/users/{userID:[0-9]+}/mark-all-as-read", handler.markUserAsRead).Methods(http.MethodPut)
|
|
|
sr.HandleFunc("/users/{username}", handler.userByUsername).Methods(http.MethodGet)
|
|
sr.HandleFunc("/users/{username}", handler.userByUsername).Methods(http.MethodGet)
|
|
|
sr.HandleFunc("/me", handler.currentUser).Methods(http.MethodGet)
|
|
sr.HandleFunc("/me", handler.currentUser).Methods(http.MethodGet)
|
|
|
sr.HandleFunc("/categories", handler.createCategory).Methods(http.MethodPost)
|
|
sr.HandleFunc("/categories", handler.createCategory).Methods(http.MethodPost)
|
|
|
sr.HandleFunc("/categories", handler.getCategories).Methods(http.MethodGet)
|
|
sr.HandleFunc("/categories", handler.getCategories).Methods(http.MethodGet)
|
|
|
sr.HandleFunc("/categories/{categoryID}", handler.updateCategory).Methods(http.MethodPut)
|
|
sr.HandleFunc("/categories/{categoryID}", handler.updateCategory).Methods(http.MethodPut)
|
|
|
sr.HandleFunc("/categories/{categoryID}", handler.removeCategory).Methods(http.MethodDelete)
|
|
sr.HandleFunc("/categories/{categoryID}", handler.removeCategory).Methods(http.MethodDelete)
|
|
|
|
|
+ sr.HandleFunc("/categories/{categoryID}/mark-all-as-read", handler.markCategoryAsRead).Methods(http.MethodPut)
|
|
|
sr.HandleFunc("/discover", handler.getSubscriptions).Methods(http.MethodPost)
|
|
sr.HandleFunc("/discover", handler.getSubscriptions).Methods(http.MethodPost)
|
|
|
sr.HandleFunc("/feeds", handler.createFeed).Methods(http.MethodPost)
|
|
sr.HandleFunc("/feeds", handler.createFeed).Methods(http.MethodPost)
|
|
|
sr.HandleFunc("/feeds", handler.getFeeds).Methods(http.MethodGet)
|
|
sr.HandleFunc("/feeds", handler.getFeeds).Methods(http.MethodGet)
|
|
@@ -44,6 +46,7 @@ func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool, feedHa
|
|
|
sr.HandleFunc("/feeds/{feedID}", handler.updateFeed).Methods(http.MethodPut)
|
|
sr.HandleFunc("/feeds/{feedID}", handler.updateFeed).Methods(http.MethodPut)
|
|
|
sr.HandleFunc("/feeds/{feedID}", handler.removeFeed).Methods(http.MethodDelete)
|
|
sr.HandleFunc("/feeds/{feedID}", handler.removeFeed).Methods(http.MethodDelete)
|
|
|
sr.HandleFunc("/feeds/{feedID}/icon", handler.feedIcon).Methods(http.MethodGet)
|
|
sr.HandleFunc("/feeds/{feedID}/icon", handler.feedIcon).Methods(http.MethodGet)
|
|
|
|
|
+ sr.HandleFunc("/feeds/{feedID}/mark-all-as-read", handler.markFeedAsRead).Methods(http.MethodPut)
|
|
|
sr.HandleFunc("/export", handler.exportFeeds).Methods(http.MethodGet)
|
|
sr.HandleFunc("/export", handler.exportFeeds).Methods(http.MethodGet)
|
|
|
sr.HandleFunc("/import", handler.importFeeds).Methods(http.MethodPost)
|
|
sr.HandleFunc("/import", handler.importFeeds).Methods(http.MethodPost)
|
|
|
sr.HandleFunc("/feeds/{feedID}/entries", handler.getFeedEntries).Methods(http.MethodGet)
|
|
sr.HandleFunc("/feeds/{feedID}/entries", handler.getFeedEntries).Methods(http.MethodGet)
|