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

signdict / website / c76ad6746a949a6f4dec724446ec91bdf7644e39

04 Oct 2025 09:15PM UTC coverage: 91.239%. First build
c76ad6746a949a6f4dec724446ec91bdf7644e39

Pull #1660

github

bitboxer
Last deprecation warning gone
Pull Request #1660: Update a few things

57 of 63 new or added lines in 28 files covered. (90.48%)

1156 of 1267 relevant lines covered (91.24%)

91.73 hits per line

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

85.71
/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!"))
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"))
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