remove redudant order_by

This commit is contained in:
Chris McCord 2021-11-10 16:07:10 -05:00
parent d9b5a61702
commit 64c68d7b61
2 changed files with 1 additions and 15 deletions

View file

@ -94,20 +94,7 @@ Hooks.AudioPlayer = {
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
let liveSocket = new LiveSocket("/live", Socket, {
hooks: Hooks,
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")
}
}
}
params: {_csrf_token: csrfToken}
})
// Show progress bar on live navigation and form submits

View file

@ -208,7 +208,6 @@ defmodule LiveBeats.MediaLibrary do
def get_last_song(user_id) do
from(s in Song,
where: s.user_id == ^user_id,
order_by: [desc: s.inserted_at, desc: s.id],
limit: 1
)
|> order_by_playlist(:desc)