refactor: get data from query

This commit is contained in:
Carlos Valente
2023-12-19 12:34:00 +01:00
parent 364d698bbc
commit fa56f48461
3 changed files with 19 additions and 26 deletions
+3 -7
View File
@@ -283,14 +283,10 @@ export const postPushSheet = async (id: string, worksheet: string) => {
* @description HTTP request to retrieve sheets state
* @return {Promise}
*/
export const getSheetState = async ({ queryKey }): Promise<SheetState> => {
const [_key, id, worksheet] = queryKey;
console.log(queryKey);
export const getSheetState = async (id: string, worksheet: string): Promise<SheetState> => {
const res = await axios.post(`${ontimeURL}/sheet-state`, {
id: '',
worksheet: '',
id,
worksheet,
});
console.log(res.data);
return res.data;
};