Skip to content

Commit

Permalink
🥨🏎️ ↝ Almost forgot -> creating a post also needs to give the user th…
Browse files Browse the repository at this point in the history
…eir planet

!
  • Loading branch information
Gizmotronn committed Nov 29, 2023
1 parent 37bb055 commit bb18774
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/Content/CreatePostForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ export default function CreatePostForm ( { planetId2 } ) { // category_id
content: postContent,
media: uploads,
planets2: planetId2,
}).then(async response => {
if (!response.error) {
await supabase.from('inventoryPLANETS').insert([
{
planet_id: planetId2,
owner_id: session?.user?.id,
},
]);

setPostContent('');
}
})
};

Expand Down

0 comments on commit bb18774

Please sign in to comment.