mirror of
https://github.com/mashirozx/sakura.git
synced 2024-12-12 09:54:35 +08:00
Update api.php
This commit is contained in:
parent
df2c829496
commit
3ac9b3a8f5
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user