i hate rebase!! i hate rebase!
This commit is contained in:
parent
ff578ed7a8
commit
87342acee0
|
@ -36,7 +36,7 @@
|
|||
But you probably already knew that. You may be looking for:<br>
|
||||
<el>
|
||||
<li>The <a href="https://git.oat.zone/oat/crystal-gauntlet">Git repository</a></li>
|
||||
<li><a href="/tools/song_upload">Song reuploading</a></li>
|
||||
<li><a href="/tools/song_upload">Song reuploading</a> and <a href="/tools/song_search">searching</a></li>
|
||||
<li><a href="/tools/levels">Levels</a></li>
|
||||
<li><a href="https://oat.zone/f/geometry_dash_gdpstest.oat.zone.zip"><i>Completely legal</i> executable download</a></li>
|
||||
</el>
|
||||
|
|
|
@ -2,7 +2,7 @@ require "ecr"
|
|||
|
||||
include CrystalGauntlet
|
||||
|
||||
CrystalGauntlet.template_endpoints["/tools/song_search"] = ->(context : HTTP::Server::Context): String {
|
||||
CrystalGauntlet.template_endpoints["/tools/song_search"] = ->(context : HTTP::Server::Context) {
|
||||
error = nil
|
||||
songs = nil
|
||||
result_limit = 10
|
||||
|
@ -13,11 +13,11 @@ CrystalGauntlet.template_endpoints["/tools/song_search"] = ->(context : HTTP::Se
|
|||
query = "%#{params["query"]}%"
|
||||
songs = DATABASE.query_all("select song_data.id, song_authors.name, song_data.name from song_data join song_authors on song_authors.id = song_data.author_id where song_data.id = ? or song_authors.name like ? or song_data.name like ? limit #{result_limit}", params["query"], query, query, as: {Int32, String, String})
|
||||
rescue error
|
||||
ECR.render("./public/template/song_search.ecr")
|
||||
ECR.embed("./public/template/song_search.ecr", context.response)
|
||||
else
|
||||
ECR.render("./public/template/song_search.ecr")
|
||||
ECR.embed("./public/template/song_search.ecr", context.response)
|
||||
end
|
||||
else
|
||||
ECR.embed("./public/template/song_search.ecr", context.response)
|
||||
end
|
||||
|
||||
ECR.render("./public/template/song_search.ecr")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue