mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 11:53:49 +00:00
auth flow
This commit is contained in:
@@ -232,12 +232,9 @@ export async function postNew(initialData: Partial<ProjectData>) {
|
||||
* @description sheet Client File
|
||||
* @return {Promise}
|
||||
*/
|
||||
export const uploadSheetClientFile = async (
|
||||
file: File
|
||||
) => {
|
||||
export const uploadSheetClientFile = async (file: File) => {
|
||||
const formData = new FormData();
|
||||
formData.append('userFile', file);
|
||||
|
||||
await axios
|
||||
.post(`${ontimeURL}/sheet-clientsecrect`, formData, {
|
||||
headers: {
|
||||
@@ -248,4 +245,14 @@ export const uploadSheetClientFile = async (
|
||||
},
|
||||
})
|
||||
.then((response) => response.data.id);
|
||||
};
|
||||
};
|
||||
|
||||
export const getSheetsAuthStatus = async () => {
|
||||
const res = await axios.get(`${ontimeURL}/sheet-authstatus`);
|
||||
return res.data;
|
||||
};
|
||||
|
||||
export const getSheetsAuthUrl = async () => {
|
||||
const res = await axios.get(`${ontimeURL}/sheet-authurl`);
|
||||
return res.data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user