From 3ac9b3a8f5243307a640f91f20dd7c9e5c7d2373 Mon Sep 17 00:00:00 2001 From: Mashiro Date: Fri, 15 Nov 2019 00:14:07 +0800 Subject: [PATCH] Update api.php --- inc/api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/api.php b/inc/api.php index aac1307..da10ac0 100644 --- a/inc/api.php +++ b/inc/api.php @@ -28,7 +28,7 @@ function upload_image(WP_REST_Request $request) * -F "cmt_img_file=@screenshot.jpg" \ * https://dev.2heng.xin/wp-json/sakura/v1/image/upload */ - // $file = $req->get_file_params(); + // $file = $request->get_file_params(); if ( !check_ajax_referer('wp_rest', '_wpnonce', false) ) { $output = array( 'status' => 403, @@ -266,4 +266,4 @@ EOS; 'Cache-Control' => 'max-age=3600')); // json 缓存控制 return $result; -} \ No newline at end of file +}