fix: update tags

This commit is contained in:
Daniel 2023-03-28 19:07:36 +03:30
parent e41c492675
commit 5328be208b
3 changed files with 2 additions and 3 deletions

View File

@ -27,7 +27,7 @@ export default function ({ onChange, defaultValue }: Props) {
return (
<CreatableSelect
isClearable={false}
isClearable
onChange={onChange}
options={options}
styles={styles}

View File

@ -39,6 +39,7 @@ export default async function (link: ExtendedLink, userId: number) {
},
},
tags: {
set: [],
connectOrCreate: link.tags.map((tag) => ({
where: {
name_ownerId: {

View File

@ -44,8 +44,6 @@ const useLinkStore = create<LinkStore>()((set) => ({
return response.ok;
},
updateLink: async (link) => {
console.log(link);
const response = await fetch("/api/routes/links", {
body: JSON.stringify(link),
headers: {