浏览代码

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

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 4 年之前
父节点
当前提交
c8aee4e0cf
共有 2 个文件被更改,包括 3 次插入4 次删除
  1. 1 1
      backend/logic/actions/activities.js
  2. 2 3
      frontend/src/pages/Admin/tabs/VerifiedSongs.vue

+ 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");
 				}
 			);
 		}