mirror of
https://github.com/mashirozx/sakura.git
synced 2024-11-26 16:58:14 +08:00
Update api.php
This commit is contained in:
parent
a1d513bcc6
commit
3aa254d017
12
inc/api.php
12
inc/api.php
@ -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' => '',
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user