2016-07-15 23:05:18 +00:00
|
|
|
import { Router } from 'express';
|
|
|
|
import * as AWSController from '../controllers/aws.controller';
|
2018-01-09 20:57:49 +00:00
|
|
|
import isAuthenticated from '../utils/isAuthenticated';
|
2016-07-15 23:05:18 +00:00
|
|
|
|
|
|
|
const router = new Router();
|
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.post('/S3/sign', isAuthenticated, AWSController.signS3);
|
|
|
|
router.post('/S3/copy', isAuthenticated, AWSController.copyObjectInS3);
|
|
|
|
router.delete('/S3/:object_key', isAuthenticated, AWSController.deleteObjectFromS3);
|
2018-05-30 04:37:10 +00:00
|
|
|
router.get('/S3/objects', AWSController.listObjectsInS3ForUser);
|
2016-07-15 23:05:18 +00:00
|
|
|
|
|
|
|
export default router;
|