summaryrefslogtreecommitdiff
path: root/internal/processing/admin/domainpermission.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-11-21 14:09:58 +0100
committerLibravatar GitHub <noreply@github.com>2024-11-21 13:09:58 +0000
commit301543616b5376585a7caff097499421acdf1806 (patch)
tree4cac6aea2c33687b1339fc3bc18e6eb64def6f9a /internal/processing/admin/domainpermission.go
parent[feature] Allow emoji shortcode to be 1-character length (#3556) (diff)
downloadgotosocial-301543616b5376585a7caff097499421acdf1806.tar.xz
[feature] Add domain permission drafts and excludes (#3547)
* [feature] Add domain permission drafts and excludes * fix typescript complaining * lint * make filenames more consistent * test own domain excluded
Diffstat (limited to 'internal/processing/admin/domainpermission.go')
-rw-r--r--internal/processing/admin/domainpermission.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/internal/processing/admin/domainpermission.go b/internal/processing/admin/domainpermission.go
index bedaf6a11..55800f458 100644
--- a/internal/processing/admin/domainpermission.go
+++ b/internal/processing/admin/domainpermission.go
@@ -31,24 +31,6 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
)
-// apiDomainPerm is a cheeky shortcut for returning
-// the API version of the given domain permission
-// (*gtsmodel.DomainBlock or *gtsmodel.DomainAllow),
-// or an appropriate error if something goes wrong.
-func (p *Processor) apiDomainPerm(
- ctx context.Context,
- domainPermission gtsmodel.DomainPermission,
- export bool,
-) (*apimodel.DomainPermission, gtserror.WithCode) {
- apiDomainPerm, err := p.converter.DomainPermToAPIDomainPerm(ctx, domainPermission, export)
- if err != nil {
- err := gtserror.NewfAt(3, "error converting domain permission to api model: %w", err)
- return nil, gtserror.NewErrorInternalError(err)
- }
-
- return apiDomainPerm, nil
-}
-
// DomainPermissionCreate creates an instance-level permission
// targeting the given domain, and then processes any side
// effects of the permission creation.