feat: get current tabs
This commit is contained in:
@@ -78,4 +78,16 @@ export const getCurrentUrl = async (): Promise<string | null> => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getCurrentTabs = async (): Promise<string[] | null> => {
|
||||||
|
try {
|
||||||
|
const response = await axios.get('http://localhost:8080/record/active/tabs');
|
||||||
|
if (response.status === 200) {
|
||||||
|
return response.data;
|
||||||
|
} else {
|
||||||
|
throw new Error('Couldn\'t retrieve stored recordings');
|
||||||
|
}
|
||||||
|
} catch(error: any) {
|
||||||
|
console.log(error);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user