forked from dbroqua/MusicTopus
Updated css for ajouter-un-album
This commit is contained in:
parent
cb69a62603
commit
c159495a59
6 changed files with 71 additions and 268 deletions
|
@ -12,7 +12,6 @@ import config, { env, mongoDbUri, secret } from "./config";
|
|||
import { isXhr } from "./helpers";
|
||||
|
||||
import indexRouter from "./routes";
|
||||
import addAlbumRouter from "./routes/addAlbum";
|
||||
|
||||
import importAlbumRouterApiV1 from "./routes/api/v1/albums";
|
||||
import importSearchRouterApiV1 from "./routes/api/v1/search";
|
||||
|
@ -81,7 +80,6 @@ app.use(
|
|||
);
|
||||
|
||||
app.use("/", indexRouter);
|
||||
app.use("/ajouter-un-album", addAlbumRouter);
|
||||
app.use("/api/v1/albums", importAlbumRouterApiV1);
|
||||
app.use("/api/v1/search", importSearchRouterApiV1);
|
||||
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
import express from "express";
|
||||
import { ensureLoggedIn } from "connect-ensure-login";
|
||||
|
||||
import Pages from "../middleware/Albums";
|
||||
|
||||
import render from "../libs/format";
|
||||
|
||||
// eslint-disable-next-line new-cap
|
||||
const router = express.Router();
|
||||
|
||||
router.route("/").get(ensureLoggedIn("/connexion"), (req, res, next) => {
|
||||
try {
|
||||
const page = new Pages(req, "ajouter-un-album/search");
|
||||
|
||||
render(res, page);
|
||||
} catch (err) {
|
||||
next(err);
|
||||
}
|
||||
});
|
||||
|
||||
router
|
||||
.route("/:discogsId")
|
||||
.get(ensureLoggedIn("/connexion"), async (req, res, next) => {
|
||||
try {
|
||||
const page = new Pages(req, "ajouter-un-album/form");
|
||||
|
||||
await page.getFormAddOne();
|
||||
|
||||
render(res, page);
|
||||
} catch (err) {
|
||||
next(err);
|
||||
}
|
||||
});
|
||||
|
||||
export default router;
|
|
@ -77,6 +77,18 @@ router
|
|||
}
|
||||
});
|
||||
|
||||
router
|
||||
.route("/ajouter-un-album")
|
||||
.get(ensureLoggedIn("/connexion"), (req, res, next) => {
|
||||
try {
|
||||
const page = new Pages(req, "ajouter-un-album");
|
||||
|
||||
render(res, page);
|
||||
} catch (err) {
|
||||
next(err);
|
||||
}
|
||||
});
|
||||
|
||||
router
|
||||
.route("/ma-collection")
|
||||
.get(ensureLoggedIn("/connexion"), async (req, res, next) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue