Move function from the text editor to the relevant file.

Signed-off-by: Armored Dragon <publicmail@armoreddragon.com>
feature/profile
Armored Dragon 2024-07-12 13:34:17 -05:00
parent f400bbe251
commit 1e5202cd59
Signed by: ArmoredDragon
GPG Key ID: C7207ACC3382AD8B
2 changed files with 15 additions and 13 deletions

View File

@ -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}`;
}
}

View File

@ -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}`;
}
}