Browse Source

Update ComposeModal

Daniel Supernault 3 năm trước cách đây
mục cha
commit
2befff8fd1
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      resources/assets/js/components/ComposeModal.vue

+ 5 - 1
resources/assets/js/components/ComposeModal.vue

@@ -1259,7 +1259,11 @@ export default {
 					axios.post('/api/compose/v0/publish', data)
 					.then(res => {
 						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 => {
 						let msg = err.response.data.message ? err.response.data.message : 'An unexpected error occured.'
 						swal('Oops, something went wrong!', msg, 'error');