mirror of
https://github.com/YunoHost-Apps/pixelfed_ynh.git
synced 2024-09-03 20:06:04 +02:00
Update ComposeModal
This commit is contained in:
parent
fb742cf4db
commit
2befff8fd1
1 changed files with 5 additions and 1 deletions
|
@ -1259,7 +1259,11 @@ export default {
|
||||||
axios.post('/api/compose/v0/publish', data)
|
axios.post('/api/compose/v0/publish', data)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
window.location.href = data;
|
if(location.pathname === '/i/web/compose') {
|
||||||
|
location.href = '/i/web/post/' + data.split('/').at(-1);
|
||||||
|
} else {
|
||||||
|
location.href = data;
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
let msg = err.response.data.message ? err.response.data.message : 'An unexpected error occured.'
|
let msg = err.response.data.message ? err.response.data.message : 'An unexpected error occured.'
|
||||||
swal('Oops, something went wrong!', msg, 'error');
|
swal('Oops, something went wrong!', msg, 'error');
|
||||||
|
|
Loading…
Add table
Reference in a new issue