User / Account model split, User and account now seperate entities, collaborators are now AccountUsers
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/torkelo/grafana-pro/pkg/bus"
|
||||
"github.com/torkelo/grafana-pro/pkg/middleware"
|
||||
m "github.com/torkelo/grafana-pro/pkg/models"
|
||||
)
|
||||
|
||||
func AdminSearchUsers(c *middleware.Context) {
|
||||
// query := c.QueryStrings("q")
|
||||
// page := c.QueryStrings("p")
|
||||
|
||||
query := m.SearchUsersQuery{Query: "", Page: 0, Limit: 20}
|
||||
if err := bus.Dispatch(&query); err != nil {
|
||||
c.JsonApiErr(500, "Failed to fetch collaboratos", err)
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, query.Result)
|
||||
}
|
||||
Reference in New Issue
Block a user