diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-11-11 17:06:41 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-11-11 17:06:41 +0300 |
commit | ddbfc995ac40db9bd1da137b03e5acf6d050ddc5 (patch) | |
tree | 39cf4bffa5db0ca5d9e6b20d2d168a1bed6f78ca /lib | |
parent | ff6c727739484df31335d2675fbd2446cc5435e1 (diff) | |
download | pleroma-ddbfc995ac40db9bd1da137b03e5acf6d050ddc5.tar.gz |
clean sql query
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/marker.ex | 2 | ||||
-rw-r--r-- | lib/pleroma/notification.ex | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/lib/pleroma/marker.ex b/lib/pleroma/marker.ex index a7ea542dd..d5ca27bf2 100644 --- a/lib/pleroma/marker.ex +++ b/lib/pleroma/marker.ex @@ -56,7 +56,7 @@ defmodule Pleroma.Marker do |> Multi.insert( :marker, fn %{counters: attrs} -> - Marker + %Marker{timeline: "notifications", user_id: user.id} |> struct(attrs) |> Ecto.Changeset.change() end, diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index 373f9b06a..158903c4b 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -41,8 +41,6 @@ defmodule Pleroma.Notification do from(q in Pleroma.Notification, where: q.user_id == ^user.id, select: %{ - timeline: "notifications", - user_id: type(^user.id, :string), unread_count: fragment("SUM( CASE WHEN seen = false THEN 1 ELSE 0 END )"), last_read_id: type(fragment("MAX( CASE WHEN seen = true THEN id ELSE null END )"), :string) |