1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-11 09:32:51 +00:00

server - update view count on threads

This commit is contained in:
2018-01-10 21:01:32 -06:00
parent d3d3bef9a5
commit 392e6de14c
4 changed files with 37 additions and 2 deletions

View File

@@ -50,7 +50,14 @@ defmodule MyAppWeb.ThreadController do
@spec get(map, map) :: any
def get(conn, params) do
{output, status} = params["id"]
fingerprint = get_req_header(conn, "fp")
thread_id = params["id"]
spawn fn ->
MyApp.ViewCounter.thread_view_count(fingerprint, thread_id)
end
{output, status} = thread_id
|> Data.Thread.get
|> Response.put_resp