mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 01:46:16 -06:00
Convert processContentType to free function and remove unused parameter
This commit is contained in:
parent
b2270e3092
commit
11c1c837cc
1 changed files with 2 additions and 3 deletions
|
|
@ -86,7 +86,7 @@ func (p *Processor) Edit(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process incoming content type
|
// Process incoming content type
|
||||||
contentType := p.processContentType(ctx, form, status, requester.Settings.StatusContentType)
|
contentType := processContentType(form, status, requester.Settings.StatusContentType)
|
||||||
|
|
||||||
// Process incoming status edit content fields.
|
// Process incoming status edit content fields.
|
||||||
content, errWithCode := p.processContent(ctx,
|
content, errWithCode := p.processContent(ctx,
|
||||||
|
|
@ -349,8 +349,7 @@ func (p *Processor) Edit(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the new content type of the status when applying an edit.
|
// Returns the new content type of the status when applying an edit.
|
||||||
func (p *Processor) processContentType(
|
func processContentType(
|
||||||
ctx context.Context,
|
|
||||||
form *apimodel.StatusEditRequest,
|
form *apimodel.StatusEditRequest,
|
||||||
status *gtsmodel.Status,
|
status *gtsmodel.Status,
|
||||||
accountDefaultContentType string,
|
accountDefaultContentType string,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue