Update Block a user form (#37359)
Use the new "form-fetch-action" for better user experience, and use JSONError to show error messages. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -90,7 +90,7 @@ func GetBlocking(ctx context.Context, blockerID, blockeeID int64) (*Blocking, er
|
||||
return nil, err
|
||||
}
|
||||
if len(blocks) == 0 {
|
||||
return nil, nil //nolint:nilnil // return nil to indicate that the object does not exist
|
||||
return nil, util.NewNotExistErrorf("blocking record doesn't exist")
|
||||
}
|
||||
return blocks[0], nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user