Skip to content

Commit 1792ace

Browse files
committed
Update nav item and validate title length when updating.
1 parent d0d2093 commit 1792ace

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<img id="logo" src="./icon/goby-logo.svg" alt="Goby Lang Logo">
2626
</a>
2727
<a target="_blank" href="https://twitter.com/goby_lang"><span>Twitter</span></a>
28-
<a target="_blank" href="https://goby-lang-slackin.herokuapp.com/"><span>Slack</span></a>
28+
<a target="_blank" href="https://www.producthunt.com/posts/goby-language"><span>ProductHunt</span></a>
2929
</div>
3030

3131
<div id="mobile-nav" class="nav-wrapper">
@@ -36,7 +36,7 @@
3636
<a target="_blank" href="https://github.com/goby-lang/goby"><span>GitHub</span></a>
3737
<a target="_blank" href="https://goby-lang.gitbooks.io/goby/content/"><span>GitBook</span></a>
3838
<a target="_blank" href="https://twitter.com/goby_lang"><span>Twitter</span></a>
39-
<a target="_blank" href="https://goby-lang-slackin.herokuapp.com/"><span>Slack</span></a>
39+
<a target="_blank" href="https://www.producthunt.com/posts/goby-language"><span>ProductHunt</span></a>
4040
</div>
4141
</div>
4242
</nav>

server.gb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ server.put('/items/{id:[0-9]+}') do |req, res|
5656

5757
if params.nil? || params[:title].nil?
5858
res.status = 400
59+
elsif params[:title].length > 40
60+
res.status = 400
5961
else
6062
record = ListItem.find(req.params[:id])
6163
if record

0 commit comments

Comments
 (0)