Quellcode durchsuchen

refactor: added (back) logic to get reports for EditSong modal for official songs

Kristian Vos vor 5 Jahren
Ursprung
Commit
d06193be34
1 geänderte Dateien mit 13 neuen und 1 gelöschten Zeilen
  1. 13 1
      frontend/components/Modals/EditSong.vue

+ 13 - 1
frontend/components/Modals/EditSong.vue

@@ -595,7 +595,19 @@ export default {
 			_this.useHTTPS = res;
 		});
 
-		io.getSocket(socket => (_this.socket = socket));
+		io.getSocket(socket => {
+			this.socket = socket;
+
+			if (this.editing.type === "songs") {
+				socket.emit(
+					"reports.getReportsForSong",
+					this.editing.song.songId,
+					res => {
+						this.reports = res.data;
+					}
+				);
+			}
+		});
 
 		setInterval(() => {
 			if (