fix: update tags
This commit is contained in:
parent
e41c492675
commit
5328be208b
|
@ -27,7 +27,7 @@ export default function ({ onChange, defaultValue }: Props) {
|
|||
|
||||
return (
|
||||
<CreatableSelect
|
||||
isClearable={false}
|
||||
isClearable
|
||||
onChange={onChange}
|
||||
options={options}
|
||||
styles={styles}
|
||||
|
|
|
@ -39,6 +39,7 @@ export default async function (link: ExtendedLink, userId: number) {
|
|||
},
|
||||
},
|
||||
tags: {
|
||||
set: [],
|
||||
connectOrCreate: link.tags.map((tag) => ({
|
||||
where: {
|
||||
name_ownerId: {
|
||||
|
|
|
@ -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: {
|
||||
|
|
Ŝarĝante…
Reference in New Issue