Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01efdc201d | ||
|
|
8a423b721d |
+3
-3
@@ -12,7 +12,7 @@ environment:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
image: elixir:1.14.0-slim
|
image: elixir:1.14.0
|
||||||
volumes:
|
volumes:
|
||||||
- name: mix
|
- name: mix
|
||||||
path: /root/.mix
|
path: /root/.mix
|
||||||
@@ -23,7 +23,7 @@ steps:
|
|||||||
- mix compile
|
- mix compile
|
||||||
|
|
||||||
- name: run migrations
|
- name: run migrations
|
||||||
image: elixir:1.14.0-slim
|
image: elixir:1.14.0
|
||||||
volumes:
|
volumes:
|
||||||
- name: mix
|
- name: mix
|
||||||
path: /root/.mix
|
path: /root/.mix
|
||||||
@@ -31,7 +31,7 @@ steps:
|
|||||||
- mix ecto.setup
|
- mix ecto.setup
|
||||||
|
|
||||||
- name: run tests
|
- name: run tests
|
||||||
image: elixir:1.14.0-slim
|
image: elixir:1.14.0
|
||||||
volumes:
|
volumes:
|
||||||
- name: mix
|
- name: mix
|
||||||
path: /root/.mix
|
path: /root/.mix
|
||||||
|
|||||||
+4
-1
@@ -43,7 +43,6 @@
|
|||||||
** 0.4.10 <2023-08-03 Thu>
|
** 0.4.10 <2023-08-03 Thu>
|
||||||
Add the CI/CD configuration.
|
Add the CI/CD configuration.
|
||||||
Add the test config.
|
Add the test config.
|
||||||
|
|
||||||
** 0.5.1 <2023-08-04 Fri>
|
** 0.5.1 <2023-08-04 Fri>
|
||||||
Add a generator for Link with random shorten.
|
Add a generator for Link with random shorten.
|
||||||
Update Links.create_one to use a function.
|
Update Links.create_one to use a function.
|
||||||
@@ -63,3 +62,7 @@
|
|||||||
Add the auth pipeline for the Link API path.
|
Add the auth pipeline for the Link API path.
|
||||||
** 0.8.3 <2023-08-11 Fri>
|
** 0.8.3 <2023-08-11 Fri>
|
||||||
Add tests for user login.
|
Add tests for user login.
|
||||||
|
** 0.8.4 <2023-08-12 Sat>
|
||||||
|
Add ErrorHandler for API Auth.
|
||||||
|
** 0.8.5 <2024-08-05 Mon>
|
||||||
|
Update the docker image for the CI/CD pipeline.
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
defmodule LinkShortenerWeb.Auth.ErrorHandler do
|
||||||
|
import Plug.Conn
|
||||||
|
|
||||||
|
def auth_error(conn, {type, _reason}, _opts) do
|
||||||
|
body = Poison.encode!(%{error: to_string(type)})
|
||||||
|
conn
|
||||||
|
|> put_resp_content_type("application/json")
|
||||||
|
|> send_resp(401, body)
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user