refactored/cleaned up API + added support for renaming tags
This commit is contained in:
@@ -58,7 +58,7 @@ export default function TeamManagement({
|
||||
|
||||
useEffect(() => {
|
||||
const fetchOwner = async () => {
|
||||
const owner = await getPublicUserData({ id: collection.ownerId });
|
||||
const owner = await getPublicUserData(collection.ownerId as number);
|
||||
setCollectionOwner(owner);
|
||||
};
|
||||
|
||||
@@ -238,7 +238,7 @@ export default function TeamManagement({
|
||||
)}
|
||||
<div className="flex items-center gap-2">
|
||||
<ProfilePhoto
|
||||
src={`/api/avatar/${e.userId}?${Date.now()}`}
|
||||
src={`/api/v1/avatar/${e.userId}?${Date.now()}`}
|
||||
className="border-[3px]"
|
||||
/>
|
||||
<div>
|
||||
@@ -425,7 +425,7 @@ export default function TeamManagement({
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
<ProfilePhoto
|
||||
src={`/api/avatar/${collection.ownerId}?${Date.now()}`}
|
||||
src={`/api/v1/avatar/${collection.ownerId}?${Date.now()}`}
|
||||
className="border-[3px]"
|
||||
/>
|
||||
<div>
|
||||
|
||||
@@ -106,7 +106,7 @@ export default function LinkDetails({ link, isOwnerOrMod }: Props) {
|
||||
}, [colorPalette, theme]);
|
||||
|
||||
const handleDownload = (format: "png" | "pdf") => {
|
||||
const path = `/api/archives/${link.collection.id}/${link.id}.${format}`;
|
||||
const path = `/api/v1/archives/${link.collection.id}/${link.id}.${format}`;
|
||||
fetch(path)
|
||||
.then((response) => {
|
||||
if (response.ok) {
|
||||
@@ -250,7 +250,7 @@ export default function LinkDetails({ link, isOwnerOrMod }: Props) {
|
||||
</div>
|
||||
|
||||
<Link
|
||||
href={`/api/archives/${link.collectionId}/${link.id}.png`}
|
||||
href={`/api/v1/archives/${link.collectionId}/${link.id}.png`}
|
||||
target="_blank"
|
||||
className="cursor-pointer hover:bg-slate-200 hover:dark:bg-neutral-700 duration-100 p-2 rounded-md"
|
||||
>
|
||||
@@ -283,7 +283,7 @@ export default function LinkDetails({ link, isOwnerOrMod }: Props) {
|
||||
</div>
|
||||
|
||||
<Link
|
||||
href={`/api/archives/${link.collectionId}/${link.id}.pdf`}
|
||||
href={`/api/v1/archives/${link.collectionId}/${link.id}.pdf`}
|
||||
target="_blank"
|
||||
className="cursor-pointer hover:bg-slate-200 hover:dark:bg-neutral-700 duration-100 p-2 rounded-md"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user