瀏覽代碼

Small fixes

Pitu 6 年之前
父節點
當前提交
79eb00f71c

+ 1 - 1
src/api/routes/admin/userDisable.js

@@ -5,7 +5,7 @@ class userDisable extends Route {
 		super('/admin/users/disable', 'post', { adminOnly: true });
 	}
 
-	async run(req, res, db) {
+	async run(req, res, db, user) {
 		if (!req.body) return res.status(400).json({ message: 'No body provided' });
 		const { id } = req.body;
 		if (!id) return res.status(400).json({ message: 'No id provided' });

+ 1 - 1
src/api/routes/admin/userEnable.js

@@ -5,7 +5,7 @@ class userEnable extends Route {
 		super('/admin/users/enable', 'post', { adminOnly: true });
 	}
 
-	async run(req, res, db) {
+	async run(req, res, db, user) {
 		if (!req.body) return res.status(400).json({ message: 'No body provided' });
 		const { id } = req.body;
 		if (!id) return res.status(400).json({ message: 'No id provided' });

+ 1 - 1
src/api/routes/admin/userPromote.js

@@ -5,7 +5,7 @@ class userPromote extends Route {
 		super('/admin/users/promote', 'post', { adminOnly: true });
 	}
 
-	async run(req, res, db) {
+	async run(req, res, db, user) {
 		if (!req.body) return res.status(400).json({ message: 'No body provided' });
 		const { id } = req.body;
 		if (!id) return res.status(400).json({ message: 'No id provided' });

+ 1 - 1
src/api/routes/albums/albumFullGET.js

@@ -6,7 +6,7 @@ class albumGET extends Route {
 		super('/album/:id/full', 'get');
 	}
 
-	async run(req, res, db) {
+	async run(req, res, db, user) {
 		const { id } = req.params;
 		if (!id) return res.status(400).json({ message: 'Invalid id supplied' });
 

+ 1 - 1
src/site/pages/dashboard/albums/index.vue

@@ -189,7 +189,7 @@
 										</div>
 										<div v-if="album.fileCount > 5"
 											class="thumb more no-background">
-											<router-link :to="`/dashboard/albums/${album.uuid}`">{{ album.fileCount - 5 }}+ more</router-link>
+											<router-link :to="`/dashboard/albums/${album.id}`">{{ album.fileCount - 5 }}+ more</router-link>
 										</div>
 									</template>
 									<template v-else>