diff --git a/config/runtime.exs b/config/runtime.exs index 090b08b..5d94143 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -39,7 +39,7 @@ if config_env() == :prod || config_env() == :staging do login_api_key = System.get_env("LOGIN_API_KEY") || raise "LOGIN_API_KEY is missing" login_host = System.get_env("LOGIN_HOST") || raise "LOGIN_HOST is missing" api_login_secret = System.get_env("API_LOGIN_SECRET") || raise "API_LOGIN_SECRET is missing" - zfinger_url = System.get_env("ZFINGER_URL") || "zfinger.datasektionen.se" + zfinger_url = System.get_env("ZFINGER_URL") || raise "ZFINGER_URL is missing" spam_api_key = System.get_env("SPAM_API_KEY") || raise "SPAM_API_KEY is missing" config :haj, diff --git a/fly.production.toml b/fly.production.toml index 51037e9..17bc634 100644 --- a/fly.production.toml +++ b/fly.production.toml @@ -13,6 +13,8 @@ processes = [] [env] PHX_HOST = "haj.metaspexet.se" + LOGIN_HOST = "login.datasektionen.se" + ZFINGER_URL = "d2imehpdli8mvq.cloudfront.net" PORT = "8080" [experimental] diff --git a/fly.staging.toml b/fly.staging.toml index c392760..c343c7b 100644 --- a/fly.staging.toml +++ b/fly.staging.toml @@ -13,6 +13,8 @@ processes = [] [env] PHX_HOST = "betaspexet.se" + LOGIN_HOST = "login.datasektionen.se" + ZFINGER_URL = "d2imehpdli8mvq.cloudfront.net" PORT = "8080" [experimental] diff --git a/lib/haj/applications.ex b/lib/haj/applications.ex index ad7d091..6133467 100644 --- a/lib/haj/applications.ex +++ b/lib/haj/applications.ex @@ -138,7 +138,8 @@ defmodule Haj.Applications do join: asg in assoc(a, :application_show_groups), where: asg.application_id == a.id, where: asg.show_group_id == ^show_group_id and a.status == ^:submitted, - preload: [user: [], application_show_groups: [show_group: [group: []]]] + preload: [user: [], application_show_groups: [show_group: [group: []]]], + order_by: [asc: a.updated_at] Repo.all(query) end @@ -202,7 +203,8 @@ defmodule Haj.Applications do query = from a in App, where: a.show_id == ^show_id and a.status == ^:submitted, - preload: [application_show_groups: [show_group: [group: []]], user: []] + preload: [application_show_groups: [show_group: [group: []]], user: []], + order_by: [asc: a.updated_at] Repo.all(query) end