diff --git a/frontend/views/themes/default/js/editAuthor.js b/frontend/views/themes/default/js/editAuthor.js index 176c6d8..ddd856d 100644 --- a/frontend/views/themes/default/js/editAuthor.js +++ b/frontend/views/themes/default/js/editAuthor.js @@ -82,3 +82,18 @@ function _readFile(file) { reader.readAsDataURL(file); }); } + +async function updateBiography() { + let form_data = { + media: media, + content: qs("#post-content").value, + id: window.location.href.split("/")[4], + }; + + const post_response = await request("/api/web/biography", "PATCH", form_data); + + if (post_response.body.success) { + window.location.href = `/post/${post_response.body.post_id}`; + } +} + \ No newline at end of file diff --git a/frontend/views/themes/default/js/richTextEditor.js b/frontend/views/themes/default/js/richTextEditor.js index 06611bb..e2917a1 100644 --- a/frontend/views/themes/default/js/richTextEditor.js +++ b/frontend/views/themes/default/js/richTextEditor.js @@ -86,16 +86,3 @@ function _readFile(file) { }); } -async function updateBiography() { - let form_data = { - media: media, - content: qs("#post-content").value, - id: window.location.href.split("/")[4], - }; - - const post_response = await request("/api/web/biography", "PATCH", form_data); - - if (post_response.body.success) { - window.location.href = `/post/${post_response.body.post_id}`; - } -}