• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

signdict / website / ac791a6a79ac45bb1fb32e214c33c7890f845e69

04 Oct 2025 07:53PM UTC coverage: 90.727%. First build
ac791a6a79ac45bb1fb32e214c33c7890f845e69

Pull #1660

github

bitboxer
More deprecations
Pull Request #1660: Update a few things

55 of 61 new or added lines in 26 files covered. (90.16%)

1223 of 1348 relevant lines covered (90.73%)

86.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/lib/sign_dict_web/controllers/vote_controller.ex
1
defmodule SignDictWeb.VoteController do
2
  use SignDictWeb, :controller
3

4
  plug Guardian.Plug.EnsureAuthenticated, error_handler: SignDictWeb.GuardianErrorHandler
5

6
  alias SignDict.Vote
7
  alias SignDict.Video
8

9
  def create(conn, %{"video_id" => video_id}) do
10
    video = Video |> Repo.get!(video_id) |> Repo.preload(:entry)
3✔
11

12
    case Vote.vote_video(conn.assigns.current_user, video) do
3✔
13
      {:ok, _vote} ->
14
        conn
15
        |> put_flash(:info, gettext("Thanks for voting!"))
3✔
16
        |> redirect(to: Router.Helpers.entry_video_path(conn, :show, video.entry, video))
3✔
17

18
      {:error, _changeset} ->
19
        conn
20
        |> put_flash(:error, gettext("Sadly your voting failed."))
×
NEW
21
        |> redirect(to: Router.Helpers.entry_video_path(conn, :show, video.entry, video))
×
22
    end
23
  end
24

25
  def delete(conn, %{"video_id" => video_id}) do
26
    video = Video |> Repo.get!(video_id) |> Repo.preload(:entry)
2✔
27

28
    Vote.delete_vote(conn.assigns.current_user, video)
2✔
29

30
    conn
31
    |> put_flash(:info, gettext("You vote was reverted successfully"))
2✔
32
    |> redirect(to: Router.Helpers.entry_video_path(conn, :show, video.entry, video))
2✔
33
  end
34
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc