minor changes and improvements

This commit is contained in:
Daniel
2023-06-12 01:58:37 +03:30
parent 06a21a39aa
commit 099784699a
8 changed files with 36 additions and 277 deletions
+6 -6
View File
@@ -1,7 +1,7 @@
import { prisma } from "@/lib/api/db";
export default async function getTags(userId: number) {
// remove empty tags
// Remove empty tags
await prisma.tag.deleteMany({
where: {
ownerId: userId,
@@ -30,11 +30,11 @@ export default async function getTags(userId: number) {
},
],
},
orderBy: {
links: {
_count: "desc",
},
},
// orderBy: {
// links: {
// _count: "desc",
// },
// },
});
return { response: tags, status: 200 };