From 18260122bbffae8ceb97a90b6279706247984434 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Mon, 14 Aug 2023 02:06:10 +0200 Subject: [PATCH] fix: minor fixes --- lib/bdfr_browser/http/plug.ex | 2 +- lib/bdfr_browser/subreddit.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bdfr_browser/http/plug.ex b/lib/bdfr_browser/http/plug.ex index f599c28..fba08be 100644 --- a/lib/bdfr_browser/http/plug.ex +++ b/lib/bdfr_browser/http/plug.ex @@ -81,7 +81,7 @@ defmodule BdfrBrowser.HTTP.Plug do |> send_resp(200, media) end - get "/_import" do + post "/_import" do :ok = BdfrBrowser.Importer.background_import() send_resp(conn, 200, "IMPORTING") end diff --git a/lib/bdfr_browser/subreddit.ex b/lib/bdfr_browser/subreddit.ex index e8101d9..5ad6724 100644 --- a/lib/bdfr_browser/subreddit.ex +++ b/lib/bdfr_browser/subreddit.ex @@ -12,6 +12,6 @@ defmodule BdfrBrowser.Subreddit do end def names do - from(s in __MODULE__, select: s.name, order_by: [asc: s.name]) + from(s in __MODULE__, select: s.name, order_by: [asc: fragment("lower(?)", s.name)]) end end