This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/routes/post.js.es6
2018-06-15 17:03:24 +02:00

15 lines
306 B
JavaScript

import { ajax } from "discourse/lib/ajax";
export default Discourse.Route.extend({
beforeModel({ params }) {
return ajax(`/p/${params.post.id}`).then(t => {
this.transitionTo(
"topic.fromParamsNear",
t.slug,
t.id,
t.current_post_number
);
});
}
});