Update api.php

This commit is contained in:
Mashiro 2019-11-15 00:14:07 +08:00 committed by GitHub
parent df2c829496
commit 3ac9b3a8f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}