We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 914dfda commit dfe1f16Copy full SHA for dfe1f16
models/Quote.js
@@ -0,0 +1,20 @@
1
+const mongoose = require("mongoose");
2
+
3
+const quoteSchema = new mongoose.Schema({
4
+ quote: {
5
+ type: String,
6
+ required: true,
7
+ },
8
+ song: {
9
10
+ requried: true,
11
12
+ album: {
13
14
15
16
+});
17
18
+const Quote = mongoose.model("Quote", quoteSchema);
19
20
+module.exports = Quote;
routes/quote.js
@@ -0,0 +1,11 @@
+const express = require("express");
+const {
+ getAllQuotes,
+ getRandomQuote,
+} = require("../controllers/quoteController");
+const router = express.Router();
+router.route("/").get(getRandomQuote);
+router.route("/all").get(getAllQuotes);
+module.exports = router;
0 commit comments