fix(blog/slide/write): updateBlog()
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2023-02-18 11:27:21 +08:00
parent 52f05a3a01
commit ab4dff592c
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -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",