Skip to content

Commit

Permalink
add watchlist model delete books
Browse files Browse the repository at this point in the history
  • Loading branch information
Myau5x committed Feb 19, 2021
1 parent 8231d29 commit c0fd736
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 68 deletions.
37 changes: 0 additions & 37 deletions controllers/booksController.js

This file was deleted.

13 changes: 0 additions & 13 deletions models/book.js

This file was deleted.

4 changes: 2 additions & 2 deletions models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module.exports = {
User: require("./user"),
Transaction: require("./transaction"),
Stock: require("./stock"),
Book: require("./book"),
SymbolName: require("./symbolName")
SymbolName: require("./symbolName"),
Watchlist: require("./watchlist")
};
13 changes: 13 additions & 0 deletions models/watchlist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const mongoose = require("mongoose");
const Schema = mongoose.Schema;

const watchlistSchema = new Schema({
user_email: {type: String, required:true},
symbol: {type: String, required:true}
//date: { type: Date, default: Date.now }

});

const Stock = mongoose.model("Watchlist", watchlistSchema );

module.exports = Stock;
16 changes: 0 additions & 16 deletions routes/api/books.js

This file was deleted.

0 comments on commit c0fd736

Please sign in to comment.