Skip to content

Commit 5a62656

Browse files
committed
feat: redirect to threads view upon thread create
1 parent f3562b0 commit 5a62656

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/views/Threads.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ export default {
353353
if (slug === '') slug = Math.random().toString(36).substring(6)
354354
thread.slug = slug
355355
return threadsApi.create(thread)
356-
.then(getThreads)
357-
.then(data => v.threadData.data = data)
356+
.then(t => $router.push({ name: 'Posts', params: { threadSlug: t.slug } }))
357+
.catch(err => console.log(err))
358358
}
359359
/* Internal Data */
360360
const $route = useRoute()

0 commit comments

Comments
 (0)