Prechádzať zdrojové kódy

fix(Station Queue)#: repositionInQueue wasn't working

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 3 rokov pred
rodič
commit
acfdb0b049

+ 1 - 3
backend/logic/actions/stations.js

@@ -3178,7 +3178,7 @@ export default {
 	 * @param {string} stationId - the station id
 	 * @param {Function} cb - callback
 	 */
-	repositionSongInQueue: isOwnerRequired(async function repositionQueue(session, song, stationId, cb) {
+	repositionSongInQueue: isOwnerRequired(async function repositionQueue(session, stationId, song, cb) {
 		const stationModel = await DBModule.runJob("GET_MODEL", { modelName: "station" }, this);
 
 		async.waterfall(
@@ -3214,8 +3214,6 @@ export default {
 				}
 			],
 			async err => {
-				console.log(err);
-
 				if (err) {
 					err = await UtilsModule.runJob("GET_ERROR", { error: err }, this);
 					this.log(

+ 1 - 1
frontend/src/components/Queue.vue

@@ -228,12 +228,12 @@ export default {
 
 			this.socket.dispatch(
 				"stations.repositionSongInQueue",
+				this.station._id,
 				{
 					...moved.element,
 					oldIndex: moved.oldIndex,
 					newIndex: moved.newIndex
 				},
-				this.station._id,
 				res => {
 					new Toast({ content: res.message, timeout: 4000 });
 				}