Skip to content

Commit

Permalink
fix : args updated
Browse files Browse the repository at this point in the history
  • Loading branch information
pronob1010 committed Dec 13, 2024
1 parent 98d3958 commit 99a94f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/REST/VendorDashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function register_routes() {
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_dashboard_statistics' ],
'args' => [],
'args' => [], // Returns a single object with statistics, not a collection. So, empty args is correct.
'permission_callback' => 'is_user_logged_in',
],
]
Expand All @@ -49,7 +49,7 @@ public function register_routes() {
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_profile_information' ],
'args' => [],
'args' => [], // Returns a single store profile. So, empty args is correct.
'permission_callback' => 'is_user_logged_in',
],
]
Expand Down Expand Up @@ -96,7 +96,7 @@ public function register_routes() {
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_products_summary' ],
'args' => [],
'args' => [], // Returns count data, not a collection. So, empty args is correct
'permission_callback' => 'is_user_logged_in',
],
]
Expand All @@ -117,7 +117,7 @@ public function register_routes() {
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_preferences' ],
'args' => [],
'args' => [], // Returns static preferences data. So, empty args is correct.
'schema' => [ $this, 'get_preferences_schema' ],
'permission_callback' => 'is_user_logged_in',
],
Expand Down

0 comments on commit 99a94f8

Please sign in to comment.