From ab4dff592c44c957eb95e1174c763dcd407e8e60 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 18 Feb 2023 11:27:21 +0800 Subject: [PATCH] fix(blog/slide/write): updateBlog() --- web/app/controllers/subdomain/blog/slide_write.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/web/app/controllers/subdomain/blog/slide_write.php b/web/app/controllers/subdomain/blog/slide_write.php index b7f72b2..555537d 100644 --- a/web/app/controllers/subdomain/blog/slide_write.php +++ b/web/app/controllers/subdomain/blog/slide_write.php @@ -42,6 +42,19 @@ if ($blog) { $blog_editor->blog_url = null; } +function updateBlog($id, $data) { + DB::update([ + "update blogs", + "set", [ + "title" => $data['title'], + "content" => $data['content'], + "content_md" => $data['content_md'], + "is_hidden" => $data['is_hidden'], + ], + "where", ["id" => $id] + ]); +} + function insertSlide($data) { DB::insert([ "insert into blogs",