Browse Source

Allowed verified songs to be hidden and vise versa

Owen Diffey 3 years ago
parent
commit
efef2b4547
2 changed files with 2 additions and 3 deletions
  1. 0 1
      backend/logic/songs.js
  2. 2 2
      frontend/src/components/modals/EditSong.vue

+ 0 - 1
backend/logic/songs.js

@@ -949,7 +949,6 @@ class _SongsModule extends CoreClass {
 					(song, next) => {
 						if (!song) return next("This song does not exist.");
 						if (song.status === "hidden") return next("This song is already hidden.");
-						if (song.status === "verified") return next("Verified songs cannot be hidden.");
 						// TODO Add err object as first param of callback
 						return next();
 					},

+ 2 - 2
frontend/src/components/modals/EditSong.vue

@@ -482,7 +482,7 @@
 				/>
 				<div class="right">
 					<button
-						v-if="song.status === 'unverified'"
+						v-if="song.status !== 'verified'"
 						class="button is-success"
 						@click="verify(song._id)"
 						content="Verify Song"
@@ -504,7 +504,7 @@
 						</button>
 					</confirm>
 					<confirm
-						v-if="song.status === 'unverified'"
+						v-if="song.status !== 'hidden'"
 						placement="left"
 						@confirm="hide(song._id)"
 					>