Fix redirection after deleting a post

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-10-19 09:26:49 +02:00
parent 024246d969
commit 31bc2f7c10
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -97,7 +97,7 @@ import { FETCH_POST, CREATE_POST, UPDATE_POST, DELETE_POST } from "../../graphql
import { IPost, PostVisibility } from "../../types/post.model"; import { IPost, PostVisibility } from "../../types/post.model";
import Editor from "../../components/Editor.vue"; import Editor from "../../components/Editor.vue";
import { IActor, IGroup } from "../../types/actor"; import { IActor, IGroup, usernameWithDomain } from "../../types/actor";
import TagInput from "../../components/Event/TagInput.vue"; import TagInput from "../../components/Event/TagInput.vue";
import RouteName from "../../router/name"; import RouteName from "../../router/name";
import Subtitle from "../../components/Utils/Subtitle.vue"; import Subtitle from "../../components/Utils/Subtitle.vue";
@ -233,7 +233,7 @@ export default class EditPost extends Vue {
if (data && this.post.attributedTo) { if (data && this.post.attributedTo) {
this.$router.push({ this.$router.push({
name: RouteName.POSTS, name: RouteName.POSTS,
params: { preferredUsername: this.post.attributedTo.preferredUsername }, params: { preferredUsername: usernameWithDomain(this.post.attributedTo) },
}); });
} }
} }