Browse Source

fix(Admin Song Tabs): on ws reconnection, songs were removed and not replaced

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 3 years ago
parent
commit
e2f2458176

+ 0 - 5
backend/logic/actions/songs.js

@@ -20,8 +20,6 @@ CacheModule.runJob("SUB", {
 			modelName: "song"
 		});
 
-		console.log("NEW UNVERIFIED SONG");
-
 		songModel.findOne({ _id: songId }, (err, song) => {
 			WSModule.runJob("EMIT_TO_ROOM", {
 				room: "admin.unverifiedSongs",
@@ -67,7 +65,6 @@ CacheModule.runJob("SUB", {
 	cb: async songId => {
 		const songModel = await DBModule.runJob("GET_MODEL", { modelName: "song" });
 		songModel.findOne({ _id: songId }, (err, song) => {
-			console.log("NEW VERIFIED SONG");
 			WSModule.runJob("EMIT_TO_ROOM", {
 				room: "admin.songs",
 				args: ["event:admin.verifiedSong.created", { data: { song } }]
@@ -111,8 +108,6 @@ CacheModule.runJob("SUB", {
 			modelName: "song"
 		});
 
-		console.log("NEW HIDDEN SONG");
-
 		songModel.findOne({ _id: songId }, (err, song) => {
 			WSModule.runJob("EMIT_TO_ROOM", {
 				room: "admin.hiddenSongs",

+ 2 - 0
frontend/src/pages/Admin/tabs/HiddenSongs.vue

@@ -281,6 +281,8 @@ export default {
 			this.$refs.keyboardShortcutsHelper.resetBox();
 		},
 		init() {
+			this.position = 1;
+			this.maxPosition = 1;
 			this.resetSongs();
 
 			if (this.songs.length > 0)

+ 2 - 0
frontend/src/pages/Admin/tabs/UnverifiedSongs.vue

@@ -299,6 +299,8 @@ export default {
 			this.$refs.keyboardShortcutsHelper.resetBox();
 		},
 		init() {
+			this.position = 1;
+			this.maxPosition = 1;
 			this.resetSongs();
 
 			if (this.songs.length > 0)

+ 2 - 0
frontend/src/pages/Admin/tabs/VerifiedSongs.vue

@@ -416,6 +416,8 @@ export default {
 			this.$refs.keyboardShortcutsHelper.resetBox();
 		},
 		init() {
+			this.position = 1;
+			this.maxPosition = 1;
 			this.resetSongs();
 
 			if (this.songs.length > 0)