Issue with create API route
Romanovv@romanovv
2 Posts
#1 · July 11, 2023, 4:17 pm
Quote from Romanovv on July 11, 2023, 4:17 pmpublic function initialize_routes() { if ($this->asgarosforum->options['enable_reactions']) { register_rest_route( 'asgaros-forum/v1', '/reaction/(?P<post_id>\d+)/(?P<reaction>[a-zA-Z0-9-]+)', array( 'methods' => 'POST', 'callback' => array($this, 'reaction_callback'), 'permission_callback' => '__return_true' ) ); } }This function on line 65 in file forum-reactions.php doesnt work for me, this function not created the new rest route, i have checkbox true in checbox reaction
Plugin version 2.4.1
public function initialize_routes() { if ($this->asgarosforum->options['enable_reactions']) { register_rest_route( 'asgaros-forum/v1', '/reaction/(?P<post_id>\d+)/(?P<reaction>[a-zA-Z0-9-]+)', array( 'methods' => 'POST', 'callback' => array($this, 'reaction_callback'), 'permission_callback' => '__return_true' ) ); } }
This function on line 65 in file forum-reactions.php doesnt work for me, this function not created the new rest route, i have checkbox true in checbox reaction
Plugin version 2.4.1
Click for thumbs down.0Click for thumbs up.0
Last edited on July 11, 2023, 4:40 pm by Romanovv
#2 · July 13, 2023, 5:43 am
Quote from Asgaros on July 13, 2023, 5:43 amHello @romanovv
Maybe you disabled REST-routes (wp-json) via some other plugin.
Hello @romanovv
Maybe you disabled REST-routes (wp-json) via some other plugin.
Click for thumbs down.0Click for thumbs up.0
If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!