Add owner_id to playlist

This commit is contained in:
Deluan
2021-10-29 22:55:28 -04:00
committed by Deluan Quintão
parent 84bbcdbfc2
commit 133fed344f
38 changed files with 173 additions and 100 deletions
+2 -2
View File
@@ -74,7 +74,7 @@ const PlaylistsSubMenu = ({ state, setState, sidebarIsOpen, dense }) => {
/>
)
const user = localStorage.getItem('username')
const userId = localStorage.getItem('userId')
const myPlaylists = []
const sharedPlaylists = []
@@ -82,7 +82,7 @@ const PlaylistsSubMenu = ({ state, setState, sidebarIsOpen, dense }) => {
const allPlaylists = Object.keys(data).map((id) => data[id])
allPlaylists.forEach((pls) => {
if (user === pls.owner) {
if (userId === pls.ownerId) {
myPlaylists.push(pls)
} else {
sharedPlaylists.push(pls)