thanks linter, love you <3

This commit is contained in:
tobi 2025-01-07 18:29:18 +01:00
parent 00038c471f
commit bb55ffcb8a
4 changed files with 8 additions and 8 deletions

View file

@ -69,7 +69,7 @@ func New(db db.DB, workers *workers.Workers) *Actions {
}
}
type AdminActionF func(context.Context) gtserror.MultiError
type ActionF func(context.Context) gtserror.MultiError
// Run runs the given admin action by executing the supplied function.
//
@ -83,7 +83,7 @@ type AdminActionF func(context.Context) gtserror.MultiError
func (a *Actions) Run(
ctx context.Context,
adminAction *gtsmodel.AdminAction,
f AdminActionF,
f ActionF,
) gtserror.WithCode {
actionKey := adminAction.Key()

View file

@ -25,7 +25,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
)
func (a *Actions) DomainKeysExpireF(domain string) AdminActionF {
func (a *Actions) DomainKeysExpireF(domain string) ActionF {
return func(ctx context.Context) gtserror.MultiError {
var (
expiresAt = time.Now()

View file

@ -38,7 +38,7 @@ import (
func (a *Actions) DomainAllowF(
actionID string,
domainAllow *gtsmodel.DomainAllow,
) AdminActionF {
) ActionF {
return func(ctx context.Context) gtserror.MultiError {
l := log.
WithContext(ctx).
@ -104,7 +104,7 @@ func (a *Actions) domainAllowSideEffects(
func (a *Actions) DomainUnallowF(
actionID string,
domainAllow *gtsmodel.DomainAllow,
) AdminActionF {
) ActionF {
return func(ctx context.Context) gtserror.MultiError {
l := log.
WithContext(ctx).
@ -169,7 +169,7 @@ func (a *Actions) domainUnallowSideEffects(
func (a *Actions) DomainBlockF(
actionID string,
domainBlock *gtsmodel.DomainBlock,
) AdminActionF {
) ActionF {
return func(ctx context.Context) gtserror.MultiError {
l := log.
WithContext(ctx).
@ -250,7 +250,7 @@ func (a *Actions) domainBlockSideEffects(
func (a *Actions) DomainUnblockF(
actionID string,
domainBlock *gtsmodel.DomainBlock,
) AdminActionF {
) ActionF {
return func(ctx context.Context) gtserror.MultiError {
l := log.
WithContext(ctx).

View file

@ -426,7 +426,7 @@ func (s *Subscriptions) processDomainPermission(
var (
insertF func() error
action *gtsmodel.AdminAction
actionF admin.AdminActionF
actionF admin.ActionF
)
if permSub.PermissionType == gtsmodel.DomainPermissionBlock {