diff options
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r-- | routers/api/v1/api.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 9943b97f78..11adfa5c5f 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -209,6 +209,8 @@ func RegisterRoutes(m *macaron.Macaron) { }) m.Get("/starred", user.GetStarredRepos) + + m.Get("/subscriptions", user.GetWatchedRepos) }) }, reqToken()) @@ -239,6 +241,8 @@ func RegisterRoutes(m *macaron.Macaron) { m.Delete("", user.Unstar) }, context.ExtractOwnerAndRepo()) }) + + m.Get("/subscriptions", user.GetMyWatchedRepos) }, reqToken()) // Repositories @@ -316,6 +320,11 @@ func RegisterRoutes(m *macaron.Macaron) { Patch(reqRepoWriter(), bind(api.EditMilestoneOption{}), repo.EditMilestone). Delete(reqRepoWriter(), repo.DeleteMilestone) }) + m.Group("/subscription", func() { + m.Get("", user.IsWatching) + m.Put("", user.Watch) + m.Delete("", user.Unwatch) + }, context.ExtractOwnerAndRepo()) m.Get("/editorconfig/:filename", context.RepoRef(), repo.GetEditorconfig) m.Group("/pulls", func() { m.Combo("").Get(bind(api.ListPullRequestsOptions{}), repo.ListPullRequests).Post(reqRepoWriter(), bind(api.CreatePullRequestOption{}), repo.CreatePullRequest) |