diff --git a/r2/r2/config/routing.py b/r2/r2/config/routing.py index 581b5471d..df7297960 100644 --- a/r2/r2/config/routing.py +++ b/r2/r2/config/routing.py @@ -141,6 +141,7 @@ def make_map(): requirements=dict(controller="hot|new|rising|randomrising")) mc('/about/sidebar', controller='front', action='sidebar') + mc('/about/sticky', controller='front', action='sticky') mc('/about/flair', controller='front', action='flairlisting') mc('/about', controller='front', action='about') mc('/comments/gilded', controller='redirect', action='gilded_comments', diff --git a/r2/r2/controllers/front.py b/r2/r2/controllers/front.py index 8cdefcfb8..48d62307c 100755 --- a/r2/r2/controllers/front.py +++ b/r2/r2/controllers/front.py @@ -752,6 +752,14 @@ class FrontController(RedditController, OAuth2ResourceController): usertext = UserText(c.site, c.site.description) return Reddit(content=usertext).render() + @require_oauth2_scope("read") + def GET_sticky(self): + if c.site.sticky_fullname: + sticky = Link._by_fullname(c.site.sticky_fullname, data=True) + self.redirect(sticky.make_permalink_slow()) + else: + abort(404) + def GET_awards(self): """The awards page.""" return BoringPage(_("awards"), content=UserAwards()).render()