refactored public page endpoints

This commit is contained in:
daniel31x13
2023-11-15 13:12:06 -05:00
parent 09ee81bf11
commit 59815f47d8
18 changed files with 262 additions and 128 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import { create } from "zustand";
import { Tag } from "@prisma/client";
import { TagIncludingLinkCount } from "@/types/global";
type ResponseObject = {
ok: boolean;
@@ -7,9 +7,9 @@ type ResponseObject = {
};
type TagStore = {
tags: Tag[];
tags: TagIncludingLinkCount[];
setTags: () => void;
updateTag: (tag: Tag) => Promise<ResponseObject>;
updateTag: (tag: TagIncludingLinkCount) => Promise<ResponseObject>;
removeTag: (tagId: number) => Promise<ResponseObject>;
};