Skip to content

Commit

Permalink
fix(核心): 修复 TS+ 用户注册协议未使用最新配置 Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed Dec 7, 2018
1 parent 5e1d640 commit e7e11bf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/Http/Controllers/APIs/V2/SystemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

use Carbon\Carbon;
use Illuminate\Http\Request;
use Zhiyi\Plus\Utils\Markdown;
use function Zhiyi\Plus\setting;
use Zhiyi\Plus\Models\Conversation;

class SystemController extends Controller
Expand Down Expand Up @@ -71,9 +73,12 @@ public function about()
* @author Foreach<[email protected]>
* @return html
*/
public function agreement()
public function agreement(Markdown $markdown)
{
$content = \Parsedown::instance()->setMarkupEscaped(true)->text(config('registerSettings.content', ''));
$content = setting('user', 'register-setting', [
'content' => '# 服务条款及隐私政策',
])['content'] ?? '# 服务条款及隐私政策';
$content = $markdown->toHtml($content);

return view('agreement', ['content' => $content]);
}
Expand Down

0 comments on commit e7e11bf

Please sign in to comment.