Move function from the text editor to the relevant file.
Signed-off-by: Armored Dragon <publicmail@armoreddragon.com>feature/profile
parent
f400bbe251
commit
1e5202cd59
|
@ -82,3 +82,18 @@ function _readFile(file) {
|
||||||
reader.readAsDataURL(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}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -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}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue