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
Этот коммит содержится в:
Harshil Sharma
2023-12-14 21:19:19 +05:30
коммит произвёл GitHub
родитель 32880efa25
Коммит 97a23d791e
16 изменённых файлов: 380 добавлений и 1339 удалений

Просмотреть файл

@@ -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))