Skip to content

Commit 656571c

Browse files
authored
Merge pull request #1265 from code-corps/1264-fix-invite-url
Fix organization invite URL, update Clouxed, fix warning
2 parents 2f49598 + 899244c commit 656571c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

lib/code_corps/emails/organization_invite_email.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ defmodule CodeCorps.Emails.OrganizationInviteEmail do
2424
defp invite_url(code, organization_name) do
2525
query_params = set_params(code, organization_name)
2626
WebClient.url()
27-
|> URI.merge("/invites/organization" <> "?" <> query_params)
27+
|> URI.merge("/organizations/new" <> "?" <> query_params)
2828
|> URI.to_string
2929
end
3030

lib/code_corps/helpers/query.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ defmodule CodeCorps.Helpers.Query do
7474
For each key in the list, the params map has a value for that key,
7575
the query condition for that `{key, value}` is applied to the queriable.
7676
"""
77-
@spec optional_filters(Queryable.t, map, list) :: Queryable.t
77+
@spec optional_filters(Ecto.Queryable.t, map, list) :: Ecto.Queryable.t
7878
def optional_filters(query, %{} = params, [key | other_keys]) do
7979
case params |> Map.get(key |> Atom.to_string) do
8080
nil -> query |> optional_filters(params, other_keys)
8181
value -> query |> where([o], field(o, ^key) == ^value)
8282
end
8383
end
84-
def optional_filters(query, %{} = params , []), do: query
84+
def optional_filters(query, %{} = _params, []), do: query
8585
end

mix.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], []},
77
"bypass": {:hex, :bypass, "0.8.1", "16d409e05530ece4a72fabcf021a3e5c7e15dcc77f911423196a0c551f2a15ca", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, optional: false]}, {:plug, "~> 1.0", [hex: :plug, optional: false]}]},
88
"certifi": {:hex, :certifi, "2.0.0", "a0c0e475107135f76b8c1d5bc7efb33cd3815cb3cf3dea7aefdd174dabead064", [:rebar3], []},
9-
"cloudex": {:hex, :cloudex, "1.0.0", "944886f408fd18d4a460cc93c22ee1790aca552599b76b92ad5d8374cf005820", [:mix], [{:httpoison, "~> 0.13.0", [hex: :httpoison, optional: false]}, {:poison, "~> 3.1.0", [hex: :poison, optional: false]}, {:timex, "~> 3.1.7", [hex: :timex, optional: false]}, {:tzdata, "~> 0.5.11", [hex: :tzdata, optional: false]}]},
9+
"cloudex": {:hex, :cloudex, "1.0.1", "51ae96126ef17abb732692ef7bbd8a9c5b26fc01c4a893c42baa219ff9ac562c", [:mix], [{:httpoison, "~> 0.13.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:poison, "~> 3.1.0", [hex: :poison, repo: "hexpm", optional: false]}, {:timex, "~> 3.1.7", [hex: :timex, repo: "hexpm", optional: false]}, {:tzdata, "~> 0.5.11", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm"},
1010
"combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], []},
1111
"comeonin": {:hex, :comeonin, "3.2.0", "cb10995a22aed6812667efb3856f548818c85d85394d8132bc116fbd6995c1ef", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, optional: false]}]},
1212
"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [], []},

priv/repo/structure.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
-- PostgreSQL database dump
33
--
44

5-
-- Dumped from database version 10.0
6-
-- Dumped by pg_dump version 10.0
5+
-- Dumped from database version 9.5.10
6+
-- Dumped by pg_dump version 10.1
77

88
SET statement_timeout = 0;
99
SET lock_timeout = 0;

test/lib/code_corps/emails/organization_invite_email_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ defmodule CodeCorps.Emails.OrganizationInviteEmailTest do
1515
params =
1616
%{code: invite.code, organization_name: invite.organization_name}
1717
|> URI.encode_query
18-
invite_url = "#{WebClient.url()}/invites/organization?#{params}"
18+
invite_url = "#{WebClient.url()}/organizations/new?#{params}"
1919

2020
assert template_model == %{
2121
invite_url: invite_url,

0 commit comments

Comments
 (0)