Support post links without titles

This commit is contained in:
spikecodes 2021-02-09 10:11:39 -08:00
parent 008924fff8
commit e731cfbac4
No known key found for this signature in database
GPG key ID: 004CECFF9B463BCB
2 changed files with 3 additions and 1 deletions

View file

@ -160,6 +160,7 @@ async fn main() -> tide::Result<()> {
app.at("/u/:name/comments/:id/:title/:comment/").get(post::item);
app.at("/user/:name/").get(user::profile);
app.at("/user/:name/comments/:id/").get(post::item);
app.at("/user/:name/comments/:id/:title/").get(post::item);
app.at("/user/:name/comments/:id/:title/:comment/").get(post::item);
@ -173,6 +174,7 @@ async fn main() -> tide::Result<()> {
app.at("/r/:sub/subscribe/").post(subreddit::subscriptions);
app.at("/r/:sub/unsubscribe/").post(subreddit::subscriptions);
// View post on subreddit
app.at("/r/:sub/comments/:id/").get(post::item);
app.at("/r/:sub/comments/:id/:title/").get(post::item);
app.at("/r/:sub/comments/:id/:title/:comment_id/").get(post::item);
// Search inside subreddit

View file

@ -35,7 +35,7 @@
</div>
{% block search %}{% endblock %}
<div id="links">
<a id="settings_link" href="/settings">
<a id="settings_link" href="/settings/">
<span>settings</span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<title>settings</title>