Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FromCommentsController.class.php #436

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions server/Application/Api/Controller/FromCommentsController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,18 @@ private function parse_content($content){
//格式化下
$return = $this->indent_json($return);
}
$array['return'] = $return ;

$array['return'] = $return ;

//解析错误时返回的内容
$err_return = $this->parse_one_line("err_return" , $content);
$err_return = htmlspecialchars_decode($err_return);
//判断是否是json数据
if (!is_null(json_decode($err_return))) {
//格式化下
$err_return = $this->indent_json($err_return);
}
$array['err_return'] = $err_return ;

//解析请求参数
$array['param'] = $this->parse_muti_line('param' , $content);

Expand Down Expand Up @@ -212,6 +222,13 @@ private function toMarkdown($array){

```
'.$array['return'].'
```'."\n";

$content .= '
**返回错误示例**

```
'.$array['err_return'].'
```

**返回参数说明**
Expand Down