1,035
edits
(Created page with "Up to: Part Of::Mastodon/Docs Routes are the things that define how URLs get mapped to program logic, and masto defines them in a bunch of places: == Rails == === Controllers === These are the "primary" routes - when you make a request to the server, rails is the first thing that catches your request. * Web interface routes: <code>config/routes.rb</code> * API routes: <code>config/routes/api.rb</code> (and other routes in there too) See the [https://guides.rub...") |
(→React) |
||
Line 38: | Line 38: | ||
So, for example, the statuses route looks like this: | So, for example, the statuses route looks like this: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="html"> | ||
<WrappedRoute path='/@:acct/:statusId' exact component={Status} content={children} /> | <WrappedRoute path='/@:acct/:statusId' exact component={Status} content={children} /> | ||
</syntaxhighlight> | </syntaxhighlight> |