thanks linter, love you <3

This commit is contained in:
tobi 2025-01-07 18:29:18 +01:00
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. // 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( func (a *Actions) Run(
ctx context.Context, ctx context.Context,
adminAction *gtsmodel.AdminAction, adminAction *gtsmodel.AdminAction,
f AdminActionF, f ActionF,
) gtserror.WithCode { ) gtserror.WithCode {
actionKey := adminAction.Key() actionKey := adminAction.Key()

View file

@ -25,7 +25,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "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 { return func(ctx context.Context) gtserror.MultiError {
var ( var (
expiresAt = time.Now() expiresAt = time.Now()

View file

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

View file

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