fix key check and ensureDirectory on startup

This commit is contained in:
arc-alex
2023-12-12 14:25:22 +01:00
parent a98bd0f4a4
commit a7a7a7d886
4 changed files with 28 additions and 25 deletions
+1 -2
View File
@@ -279,7 +279,6 @@ export const postPushSheet = async () => {
return response.data.data;
};
/**
* @description HTTP request to retrieve google sheets settings
* @return {Promise}
@@ -305,4 +304,4 @@ export async function postSheetSettings(data: GoogleSheet): Promise<GoogleSheet>
export async function getSheetstate(): Promise<GoogleSheetState> {
const res = await axios.get(`${ontimeURL}/sheet-state`);
return res.data;
}
}
@@ -1,4 +1,4 @@
import { ChangeEvent, useEffect,useRef, useState } from 'react';
import { ChangeEvent, useEffect, useRef, useState } from 'react';
import {
Button,
Input,
@@ -122,9 +122,7 @@ export default function SheetsModal(props: SheetsModalProps) {
};
const handlePushData = () => {
postPushSheet().then((data) => {
console.log(data);
});
postPushSheet().then((_) => {});
};
const handleFinalise = async () => {
@@ -169,13 +167,11 @@ export default function SheetsModal(props: SheetsModalProps) {
<ModalCloseButton />
<ModalBody>
{rundown && (
<>
<PreviewExcel
rundown={rundown ?? []}
project={project ?? projectDataPlaceholder}
userFields={userFields ?? userFieldsPlaceholder}
/>
</>
<PreviewExcel
rundown={rundown ?? []}
project={project ?? projectDataPlaceholder}
userFields={userFields ?? userFieldsPlaceholder}
/>
)}
{!rundown && (
<>