Normalize to double quotes across all files with Prettier
This commit is contained in:
1 parent
73bff72cec
commit
a5659cf4c8
190 files changed
+9523
-8859
No files matched your search
@@ -1,45 +1,59 @@
|
||||
const express = require('express');
|
||||
const express = require("express");
|
||||
const collectionRouter = express.Router();
|
||||
|
||||
const collectionController = require('../controllers/collectionController');
|
||||
const { collectionPicturesUpload } = require('../services/mutlerStorageLocations');
|
||||
const collectionController = require("../controllers/collectionController");
|
||||
const {
|
||||
collectionPicturesUpload,
|
||||
} = require("../services/mutlerStorageLocations");
|
||||
|
||||
// ! /collections
|
||||
// * GET - ALL COLLECTIONS
|
||||
collectionRouter.get('/', collectionController.getCollections);
|
||||
collectionRouter.get("/", collectionController.getCollections);
|
||||
|
||||
// * GET - COLLECTION BY ID
|
||||
collectionRouter.get('/:id', collectionController.getCollectionById);
|
||||
collectionRouter.get("/:id", collectionController.getCollectionById);
|
||||
|
||||
// * POST - CREATE COLLECTION
|
||||
collectionRouter.post('/', collectionController.createCollection);
|
||||
collectionRouter.post("/", collectionController.createCollection);
|
||||
|
||||
// * PUT - UPDATE COLLECTION
|
||||
const upload = collectionPicturesUpload.fields([
|
||||
{ name: 'poster', maxCount: 1 },
|
||||
{ name: 'backdrop', maxCount: 1 }
|
||||
{ name: "poster", maxCount: 1 },
|
||||
{ name: "backdrop", maxCount: 1 },
|
||||
]);
|
||||
collectionRouter.put('/:id', upload, collectionController.updateCollection);
|
||||
collectionRouter.put("/:id", upload, collectionController.updateCollection);
|
||||
|
||||
// * PUT - REFRESH COLLECTION
|
||||
collectionRouter.put('/:id/refresh', collectionController.refrechCollection);
|
||||
collectionRouter.put("/:id/refresh", collectionController.refrechCollection);
|
||||
|
||||
// * PUT - GET COLLECTION PARTS
|
||||
collectionRouter.put('/:id/parts', collectionController.getCollectionParts);
|
||||
collectionRouter.put("/:id/parts", collectionController.getCollectionParts);
|
||||
|
||||
// * DELETE - DELETE COLLECTION
|
||||
collectionRouter.delete('/:id', collectionController.deleteCollection);
|
||||
collectionRouter.delete("/:id", collectionController.deleteCollection);
|
||||
|
||||
// * POST - ADD ENTRY TO A COLLECTION
|
||||
collectionRouter.post('/:collectionId/entries/:entryId', collectionController.addEntryToCollection);
|
||||
collectionRouter.post(
|
||||
"/:collectionId/entries/:entryId",
|
||||
collectionController.addEntryToCollection,
|
||||
);
|
||||
|
||||
// * PATCH - UPDATE ENTRY ORDER IN COLLECTION
|
||||
collectionRouter.patch('/:collectionId/entries/:entryId', collectionController.updateCollectionEntryOrder);
|
||||
collectionRouter.patch(
|
||||
"/:collectionId/entries/:entryId",
|
||||
collectionController.updateCollectionEntryOrder,
|
||||
);
|
||||
|
||||
// * DELETE - REMOVE AN ENTRY FROM A COLLECTION
|
||||
collectionRouter.delete('/:collectionId/entries/:entryId', collectionController.removeEntryFromCollection);
|
||||
collectionRouter.delete(
|
||||
"/:collectionId/entries/:entryId",
|
||||
collectionController.removeEntryFromCollection,
|
||||
);
|
||||
|
||||
// * POST - CREATE COLLECTION WITH ENTRY
|
||||
collectionRouter.post('/collection-with-entry', collectionController.createCollectionWithEntry);
|
||||
collectionRouter.post(
|
||||
"/collection-with-entry",
|
||||
collectionController.createCollectionWithEntry,
|
||||
);
|
||||
|
||||
module.exports = collectionRouter;
|
||||
Reference in new issue
Block a user