New report router and user reporting refactoring (#25713)
* Added materialized view migration * Renamed mat view * Added channel membership mat view and indexes * Added channel membership mat view and indexes * Added new index * WIP * Simplifying user reporting code * Created app and API layer for cahnnel reporting, reporting refactoring in general * New router * Remobved channel reporting meanwhile * Upodated autogenerated stuff * Lint fix * Fixed typo * api vet * i18n fix * Fixed API vetting and removed channel reporting constants * yaml * removed app pagination tests
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
32880efa25
Коммит
97a23d791e
@@ -139,6 +139,8 @@ type Routes struct {
|
||||
Drafts *mux.Router // 'api/v4/drafts'
|
||||
|
||||
IPFiltering *mux.Router // 'api/v4/ip_filtering'
|
||||
|
||||
Reports *mux.Router // 'api/v4/reports'
|
||||
}
|
||||
|
||||
type API struct {
|
||||
@@ -265,6 +267,8 @@ func Init(srv *app.Server) (*API, error) {
|
||||
|
||||
api.BaseRoutes.IPFiltering = api.BaseRoutes.APIRoot.PathPrefix("/ip_filtering").Subrouter()
|
||||
|
||||
api.BaseRoutes.Reports = api.BaseRoutes.APIRoot.PathPrefix("/reports").Subrouter()
|
||||
|
||||
api.InitUser()
|
||||
api.InitBot()
|
||||
api.InitTeam()
|
||||
@@ -309,6 +313,7 @@ func Init(srv *app.Server) (*API, error) {
|
||||
api.InitHostedCustomer()
|
||||
api.InitDrafts()
|
||||
api.InitIPFiltering()
|
||||
api.InitReports()
|
||||
|
||||
srv.Router.Handle("/api/v4/{anything:.*}", http.HandlerFunc(api.Handle404))
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user