#1692 add admin APIs to add/remove a user from teams
This commit is contained in:
parent
9dda9ef07c
commit
b1d41cfa60
11 changed files with 712 additions and 639 deletions
|
@ -18,6 +18,7 @@ import (
|
|||
|
||||
type APIContext struct {
|
||||
*Context
|
||||
Org *APIOrganization
|
||||
}
|
||||
|
||||
// Error responses error message to client with given message.
|
||||
|
@ -40,6 +41,7 @@ func (ctx *APIContext) Error(status int, title string, obj interface{}) {
|
|||
})
|
||||
}
|
||||
|
||||
// SetLinkHeader sets pagination link header by given totol number and page size.
|
||||
func (ctx *APIContext) SetLinkHeader(total, pageSize int) {
|
||||
page := paginater.New(total, pageSize, ctx.QueryInt("page"), 0)
|
||||
links := make([]string, 0, 4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue