update
This commit is contained in:
parent
c8a93ddf65
commit
23bda4a56f
@ -5,7 +5,7 @@ if ($api_class == 'admin') {
|
||||
// 处理管理员请求
|
||||
// ...
|
||||
} else {
|
||||
http_response_code(401)
|
||||
http_response_code(401);
|
||||
echo json_encode(['error' => 'Unauthorized', 'code' => 401]);
|
||||
exit;
|
||||
}
|
||||
@ -16,7 +16,7 @@ elseif ($api_class != 'admin') {
|
||||
// 处理已登录用户请求
|
||||
// ...
|
||||
} else {
|
||||
http_response_code(401)
|
||||
http_response_code(401);
|
||||
echo json_encode(['error' => 'Unauthorized', 'code' => 401]);
|
||||
exit;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ if ($article) {
|
||||
'article' => [
|
||||
'title' => $article['title'],
|
||||
'author' => 'admin', // TODO:
|
||||
'auth_avatarUrl' => 'TODO',
|
||||
'publishDate' => $article['publishDate'],
|
||||
'content' => $article['content']
|
||||
],
|
||||
@ -35,7 +36,7 @@ if ($article) {
|
||||
return [
|
||||
'id' => $comment['id'],
|
||||
'author' => $comment['author'],
|
||||
'avatarUrl' => $comment['avatarUrl'] ? $comment['avatarUrl'] : '/placeholder.svg?height=40&width=40',
|
||||
'avatarUrl' => $comment['avatarUrl'] ? $comment['avatarUrl'] : '',
|
||||
'content' => $comment['content']
|
||||
];
|
||||
}, $comments)
|
||||
|
Loading…
Reference in New Issue
Block a user