mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-22 08:01:00 +00:00
remove redudant order_by
This commit is contained in:
parent
d9b5a61702
commit
64c68d7b61
2 changed files with 1 additions and 15 deletions
|
@ -94,20 +94,7 @@ Hooks.AudioPlayer = {
|
||||||
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
|
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
|
||||||
let liveSocket = new LiveSocket("/live", Socket, {
|
let liveSocket = new LiveSocket("/live", Socket, {
|
||||||
hooks: Hooks,
|
hooks: Hooks,
|
||||||
params: {_csrf_token: csrfToken},
|
params: {_csrf_token: csrfToken}
|
||||||
dom: {
|
|
||||||
onNodeAdded(node){
|
|
||||||
if(node.getAttribute && node.getAttribute("data-fade-in")){
|
|
||||||
from.classList.add("fade-in")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onBeforeElUpdated(from, to) {
|
|
||||||
if(from.classList.contains("fade-in")){
|
|
||||||
from.classList.remove("fade-in")
|
|
||||||
from.classList.add("fade-in")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Show progress bar on live navigation and form submits
|
// Show progress bar on live navigation and form submits
|
||||||
|
|
|
@ -208,7 +208,6 @@ defmodule LiveBeats.MediaLibrary do
|
||||||
def get_last_song(user_id) do
|
def get_last_song(user_id) do
|
||||||
from(s in Song,
|
from(s in Song,
|
||||||
where: s.user_id == ^user_id,
|
where: s.user_id == ^user_id,
|
||||||
order_by: [desc: s.inserted_at, desc: s.id],
|
|
||||||
limit: 1
|
limit: 1
|
||||||
)
|
)
|
||||||
|> order_by_playlist(:desc)
|
|> order_by_playlist(:desc)
|
||||||
|
|
Loading…
Reference in a new issue