Browse Source

fix(Activities): wrong callback status resulted in activities not being loaded

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

+ 1 - 1
backend/logic/actions/activities.js

@@ -70,7 +70,7 @@ export default {
 				this.log("SUCCESS", "ACTIVITIES_LENGTH", `Got length of activities for user ${userId} successfully.`);
 
 				return cb({
-					status: "error",
+					status: "success",
 					message: "Successfully obtained length of activities.",
 					data: { length: count }
 				});

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

@@ -337,9 +337,8 @@ export default {
 				"songs.getSongFromSongId",
 				this.$route.query.songId,
 				res => {
-					if (res.status === "success") {
-						this.edit(res.data.song);
-					} else new Toast("Song with that ID not found");
+					if (res.status === "success") this.edit(res.data.song);
+					else new Toast("Song with that ID not found");
 				}
 			);
 		}