const getFilesList = async () => {
await //first api call
wait for 1 second
await //second API call
};
I want to wait for one second between the first and second API as a result of the second API being dependent on the first API and that result takes some time to generate.
you can use timers in JS or wait.
Like this :
const getFilesList = async () => {
await //first api call
await new Promise(resolve => setTimeout(resolve, 1000))
await //second API call
};