mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 23:19:09 +00:00
feat: google sheets(#579)
--------- Co-authored-by: Carlos Valente <carlosvalente@pm.me>
This commit is contained in:
committed by
GitHub
parent
068ec800f4
commit
c0fb865959
@@ -21,6 +21,13 @@ import {
|
||||
postViewSettings,
|
||||
previewExcel,
|
||||
postHTTP,
|
||||
getAuthenticationUrl,
|
||||
uploadSheetClientFile as uploadClientSecret,
|
||||
pullSheet,
|
||||
pushSheet,
|
||||
postId,
|
||||
getAuthentication,
|
||||
getClientSecrect as getClientSecret,
|
||||
} from '../controllers/ontimeController.js';
|
||||
|
||||
import {
|
||||
@@ -32,6 +39,9 @@ import {
|
||||
viewValidator,
|
||||
validateHTTP,
|
||||
validateOscSubscription,
|
||||
validateSheetid,
|
||||
validateWorksheet,
|
||||
validateSheetOptions,
|
||||
} from '../controllers/ontimeController.validate.js';
|
||||
import { projectSanitiser } from '../controllers/projectController.validate.js';
|
||||
|
||||
@@ -96,3 +106,23 @@ router.post('/http', validateHTTP, postHTTP);
|
||||
|
||||
// create route between controller and '/ontime/new' endpoint
|
||||
router.post('/new', projectSanitiser, postNew);
|
||||
|
||||
//SETP-1
|
||||
router.post('/sheet/clientsecret', uploadFile, uploadClientSecret);
|
||||
router.get('/sheet/clientsecret', uploadFile, getClientSecret);
|
||||
|
||||
//SETP-2
|
||||
router.get('/sheet/authentication/url', getAuthenticationUrl);
|
||||
router.get('/sheet/authentication', getAuthentication);
|
||||
|
||||
//STEP-3
|
||||
router.post('/sheet/id', validateSheetid, postId);
|
||||
|
||||
//STEP-4
|
||||
router.post('/sheet/worksheet', validateWorksheet, postId);
|
||||
|
||||
//STEP-5 download and generate preview
|
||||
router.post('/sheet/pull', validateSheetOptions, pullSheet);
|
||||
|
||||
//STEP-5 upload
|
||||
router.post('/sheet-push', validateSheetOptions, pushSheet);
|
||||
|
||||
Reference in New Issue
Block a user