mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 17:32:25 -05:00
more work on struct validation
This commit is contained in:
parent
8ba816cd83
commit
dc2e1bf9ab
14 changed files with 455 additions and 144 deletions
|
|
@ -47,10 +47,8 @@ func (p *processor) Fave(ctx context.Context, requestingAccount *gtsmodel.Accoun
|
|||
if !visible {
|
||||
return nil, gtserror.NewErrorNotFound(errors.New("status is not visible"))
|
||||
}
|
||||
if targetStatus.VisibilityAdvanced != nil {
|
||||
if !targetStatus.VisibilityAdvanced.Likeable {
|
||||
return nil, gtserror.NewErrorForbidden(errors.New("status is not faveable"))
|
||||
}
|
||||
if !targetStatus.VisibilityAdvanced.Likeable {
|
||||
return nil, gtserror.NewErrorForbidden(errors.New("status is not faveable"))
|
||||
}
|
||||
|
||||
// first check if the status is already faved, if so we don't need to do anything
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue