|
|
@@ -550,13 +550,13 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
|
|
|
|
m.Group("/tech", func() { |
|
|
|
m.Get("", tech.FindTech) |
|
|
|
m.Post("/basic", tech.ImportBasicInfo) |
|
|
|
m.Post("/basic", hasRole(models.TechProgramAdmin), tech.ImportBasicInfo) |
|
|
|
m.Get("/filter", tech.GetFilterInfo) |
|
|
|
m.Get("/search", tech.SearchTechProjectInfo) |
|
|
|
m.Get("/repo_search", tech.SearchRepoInfo) |
|
|
|
m.Get("/admin", tech.GetAdminRepoInfo) |
|
|
|
m.Get("/admin", hasRole(models.TechProgramAdmin), tech.GetAdminRepoInfo) |
|
|
|
m.Get("/my", tech.GetMyRepoInfo) |
|
|
|
m.Post("/admin/:action", bind(tech.ActionIDs{}), tech.Action) |
|
|
|
m.Post("/admin/:action", hasRole(models.TechProgramAdmin), bind(tech.ActionIDs{}), tech.Action) |
|
|
|
m.Post("/openi", bind(api.OpenITechRepo{}), tech.CommitOpenIRepo) |
|
|
|
m.Post("/no_openi", bind(api.NotOpenITechRepo{}), tech.CommitNotOpenIRepo) |
|
|
|
m.Get("/is_admin", tech.IsAdmin) |
|
|
|