p5.js-web-editor/server/routes/aws.routes.js
Liang Tang d5856ba923 Remove authorization from specific routes (#642)
* fixes #569

* update listObjectsInS3ForUser

* update client-side routes

* update aws controller

* update

* redirect to /login when unlogged in
2018-05-29 21:37:10 -07:00

12 lines
495 B
JavaScript

import { Router } from 'express';
import * as AWSController from '../controllers/aws.controller';
import isAuthenticated from '../utils/isAuthenticated';
const router = new Router();
router.post('/S3/sign', isAuthenticated, AWSController.signS3);
router.post('/S3/copy', isAuthenticated, AWSController.copyObjectInS3);
router.delete('/S3/:object_key', isAuthenticated, AWSController.deleteObjectFromS3);
router.get('/S3/objects', AWSController.listObjectsInS3ForUser);
export default router;