fix(web/blog/write): new blog url

This commit is contained in:
Baoshuo Ren 2022-11-07 06:30:50 +08:00
parent e9a4d15dd2
commit 2a69d50d6d
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ $blog_editor->save = function ($data) {
} else { } else {
insertBlog($data); insertBlog($data);
$blog_id = DB::insert_id(); $blog_id = DB::insert_id();
(new UOJBlog(['id' => $blog_id, 'type' => 'B']))->setAsCur(); UOJBlog::query(strval($blog_id))->setAsCur();
$ret['blog_id'] = $blog_id; $ret['blog_id'] = $blog_id;
$ret['blog_write_url'] = UOJBlog::cur()->getUriForWrite(); $ret['blog_write_url'] = UOJBlog::cur()->getUriForWrite();
$ret['blog_url'] = UOJBlog::cur()->getBlogUri(); $ret['blog_url'] = UOJBlog::cur()->getBlogUri();

View File

@ -62,7 +62,7 @@ $blog_editor->save = function ($data) {
} else { } else {
insertSlide($data); insertSlide($data);
$blog_id = DB::insert_id(); $blog_id = DB::insert_id();
(new UOJBlog(['id' => $blog_id, 'type' => 'S']))->setAsCur(); UOJBlog::query(strval($blog_id))->setAsCur();
$ret['blog_id'] = $blog_id; $ret['blog_id'] = $blog_id;
$ret['blog_write_url'] = UOJBlog::cur()->getUriForWrite(); $ret['blog_write_url'] = UOJBlog::cur()->getUriForWrite();
$ret['blog_url'] = UOJBlog::cur()->getBlogUri(); $ret['blog_url'] = UOJBlog::cur()->getBlogUri();