mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Admin accounts endpoints; approve/reject sign-ups (#2826)
* update settings panels, add pending overview + approve/deny functions * add admin accounts get, approve, reject * send approved/rejected emails * use signup URL * docs! * email * swagger * web linting * fix email tests * wee lil fixerinos * use new paging logic for GetAccounts() series of admin endpoints, small changes to query building * shuffle useAccountIDIn check *before* adding to query * fix parse from toot react error * use `netip.Addr` * put valid slices in globals * optimistic updates for account state --------- Co-authored-by: kim <grufwub@gmail.com>
This commit is contained in:
@@ -19,9 +19,11 @@ package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/netip"
|
||||
"time"
|
||||
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/paging"
|
||||
)
|
||||
|
||||
// Account contains functions related to account getting/setting/creation.
|
||||
@@ -56,6 +58,25 @@ type Account interface {
|
||||
// GetAccountByFollowersURI returns one account with the given followers_uri, or an error if something goes wrong.
|
||||
GetAccountByFollowersURI(ctx context.Context, uri string) (*gtsmodel.Account, error)
|
||||
|
||||
// GetAccounts returns accounts
|
||||
// with the given parameters.
|
||||
GetAccounts(
|
||||
ctx context.Context,
|
||||
origin string,
|
||||
status string,
|
||||
mods bool,
|
||||
invitedBy string,
|
||||
username string,
|
||||
displayName string,
|
||||
domain string,
|
||||
email string,
|
||||
ip netip.Addr,
|
||||
page *paging.Page,
|
||||
) (
|
||||
[]*gtsmodel.Account,
|
||||
error,
|
||||
)
|
||||
|
||||
// PopulateAccount ensures that all sub-models of an account are populated (e.g. avatar, header etc).
|
||||
PopulateAccount(ctx context.Context, account *gtsmodel.Account) error
|
||||
|
||||
|
Reference in New Issue
Block a user