Merge pull request #233 from christianbundy/publish-redirect-latest

Redirect to Latest after publishing new message
This commit is contained in:
Cinnamon 2020-02-18 11:19:31 -08:00 committed by GitHub
commit 6c6c46e4be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -536,13 +536,13 @@ router
});
};
ctx.body = await publish({ text, contentWarning });
ctx.redirect("/");
ctx.redirect("/public/latest");
})
.post("/publish/custom", koaBody(), async ctx => {
const text = String(ctx.request.body.text);
const obj = JSON.parse(text);
ctx.body = await post.publishCustom(obj);
ctx.redirect(`/thread/${encodeURIComponent(ctx.body.key)}`);
ctx.redirect(`/public/latest`);
})
.post("/follow/:feed", koaBody(), async ctx => {
const { feed } = ctx.params;