fix code
This commit is contained in:
parent
47957c2a6a
commit
be07574cfe
3 changed files with 6 additions and 6 deletions
|
@ -5,7 +5,7 @@ use WP_Error;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
use WP_REST_Server;
|
use WP_REST_Server;
|
||||||
use WP_REST_Response;
|
use WP_REST_Response;
|
||||||
use Activitypub\Collection\Users;
|
use Activitypub\Collection\Users as User_Collection;
|
||||||
use Activitypub\Collection\Followers as FollowerCollection;
|
use Activitypub\Collection\Followers as FollowerCollection;
|
||||||
|
|
||||||
use function Activitypub\get_rest_url_by_path;
|
use function Activitypub\get_rest_url_by_path;
|
||||||
|
@ -52,7 +52,7 @@ class Followers {
|
||||||
*/
|
*/
|
||||||
public static function get( $request ) {
|
public static function get( $request ) {
|
||||||
$user_id = $request->get_param( 'user_id' );
|
$user_id = $request->get_param( 'user_id' );
|
||||||
$user = Users::get_by_various( $user_id );
|
$user = User_Collection::get_by_various( $user_id );
|
||||||
|
|
||||||
if ( is_wp_error( $user ) ) {
|
if ( is_wp_error( $user ) ) {
|
||||||
return $user;
|
return $user;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Activitypub\Rest;
|
namespace Activitypub\Rest;
|
||||||
|
|
||||||
use Activitypub\Collection\Users;
|
use Activitypub\Collection\Users as User_Collection;
|
||||||
|
|
||||||
use function Activitypub\get_rest_url_by_path;
|
use function Activitypub\get_rest_url_by_path;
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class Following {
|
||||||
*/
|
*/
|
||||||
public static function get( $request ) {
|
public static function get( $request ) {
|
||||||
$user_id = $request->get_param( 'user_id' );
|
$user_id = $request->get_param( 'user_id' );
|
||||||
$user = Users::get_by_various( $user_id );
|
$user = User_Collection::get_by_various( $user_id );
|
||||||
|
|
||||||
if ( is_wp_error( $user ) ) {
|
if ( is_wp_error( $user ) ) {
|
||||||
return $user;
|
return $user;
|
||||||
|
|
|
@ -4,8 +4,8 @@ namespace Activitypub\Rest;
|
||||||
use WP_Error;
|
use WP_Error;
|
||||||
use WP_REST_Server;
|
use WP_REST_Server;
|
||||||
use WP_REST_Response;
|
use WP_REST_Response;
|
||||||
use Activitypub\Collection\Users;
|
|
||||||
use Activitypub\Activity\Activity;
|
use Activitypub\Activity\Activity;
|
||||||
|
use Activitypub\Collection\Users as User_Collection;
|
||||||
|
|
||||||
use function Activitypub\get_context;
|
use function Activitypub\get_context;
|
||||||
use function Activitypub\url_to_authorid;
|
use function Activitypub\url_to_authorid;
|
||||||
|
@ -74,7 +74,7 @@ class Inbox {
|
||||||
*/
|
*/
|
||||||
public static function user_inbox_get( $request ) {
|
public static function user_inbox_get( $request ) {
|
||||||
$user_id = $request->get_param( 'user_id' );
|
$user_id = $request->get_param( 'user_id' );
|
||||||
$user = Users::get_by_various( $user_id );
|
$user = User_Collection::get_by_various( $user_id );
|
||||||
|
|
||||||
if ( is_wp_error( $user ) ) {
|
if ( is_wp_error( $user ) ) {
|
||||||
return $user;
|
return $user;
|
||||||
|
|
Loading…
Reference in a new issue