I want to create a server action like this:
- API action
- (wait untill API action has completed)
- Insert API data into database
Step 1 and 3 is no big deal, but I’m not sure how I can make the insert step “wait” untill the API action is completed. Now the insert runs faster then the API action has gathered data, so it won’t insert any data at all.