Update api.php

This commit is contained in:
Mashiro 2019-12-03 21:48:15 +08:00 committed by GitHub
parent a1d513bcc6
commit 3aa254d017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,9 +39,7 @@ function get_qq_info(WP_REST_Request $request)
$output = array( $output = array(
'status' => 403, 'status' => 403,
'success' => false, 'success' => false,
'message' => 'Unauthorized client.', 'message' => 'Unauthorized client.'
'avatar' => 'https://q2.qlogo.cn/headimg_dl?dst_uin=0&spec=100',
'name' => '',
); );
} elseif ($_GET['qq']) { } elseif ($_GET['qq']) {
$qq = $_GET['qq']; $qq = $_GET['qq'];
@ -65,18 +63,14 @@ function get_qq_info(WP_REST_Request $request)
$output = array( $output = array(
'status' => 404, 'status' => 404,
'success' => false, 'success' => false,
'message' => 'QQ number not exist.', 'message' => 'QQ number not exist.'
'avatar' => 'https://q.qlogo.cn/headimg_dl?dst_uin=0&spec=100',
'name' => '',
); );
} }
} else { } else {
$output = array( $output = array(
'status' => 400, 'status' => 400,
'success' => false, 'success' => false,
'message' => 'Bad Request', 'message' => 'Bad Request'
'avatar' => 'https://q2.qlogo.cn/headimg_dl?dst_uin=0&spec=100',
'name' => '',
); );
} }