mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] Deinterface processor and subprocessors (#1501)
* [chore] Deinterface processor and subprocessors * expose subprocessors via function calls * missing license header
This commit is contained in:
@ -33,7 +33,8 @@ import (
|
||||
"github.com/superseriousbusiness/gotosocial/internal/uris"
|
||||
)
|
||||
|
||||
func (p *processor) Create(ctx context.Context, account *gtsmodel.Account, form *apimodel.ReportCreateRequest) (*apimodel.Report, gtserror.WithCode) {
|
||||
// Create creates one user report / flag, using the provided form parameters.
|
||||
func (p *Processor) Create(ctx context.Context, account *gtsmodel.Account, form *apimodel.ReportCreateRequest) (*apimodel.Report, gtserror.WithCode) {
|
||||
if account.ID == form.AccountID {
|
||||
err := errors.New("cannot report your own account")
|
||||
return nil, gtserror.NewErrorBadRequest(err, err.Error())
|
||||
|
Reference in New Issue
Block a user