Skip to content

Commit

Permalink
Merge branch 'master' into airbnb-prettier-eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
joshfinnie authored Oct 31, 2019
2 parents e541ab4 + 7526f36 commit b5c4393
Show file tree
Hide file tree
Showing 27 changed files with 1,176 additions and 503 deletions.
4 changes: 3 additions & 1 deletion __tests__/serverjs/updatecards.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const convertedExampleCard = {
colors: ['R'],
type: 'Creature — Devil',
tcgplayer_id: 180776,
power: '3',
power: '4',
toughness: '3',
image_small: 'https://img.scryfall.com/cards/small/front/a/5/a5ebb551-6b0d-45fa-88c8-3746214094f6.jpg?1547517462',
image_normal: 'https://img.scryfall.com/cards/normal/front/a/5/a5ebb551-6b0d-45fa-88c8-3746214094f6.jpg?1547517462',
art_crop: 'https://img.scryfall.com/cards/art_crop/front/a/5/a5ebb551-6b0d-45fa-88c8-3746214094f6.jpg?1547517462',
Expand Down Expand Up @@ -65,6 +66,7 @@ const convertedExampleDoubleFacedCardFlipFace = {
type: 'Creature — Werewolf',
tcgplayer_id: 57617,
power: '2',
toughness: '2',
image_small: undefined,
image_normal: undefined,
art_crop: undefined,
Expand Down
18 changes: 16 additions & 2 deletions models/blog.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
let mongoose = require('mongoose');

// Cube schema
//this pattern lets us define comment recursively
var Comment = new mongoose.Schema();
Comment.add({
owner: String,
ownerName: String,
content: String,
index: Number,
timePosted: Date,
comments: [Comment],
updated: Boolean
});

// Blog schema
let blogSchema = mongoose.Schema({
title: String,
body: String,
Expand All @@ -10,7 +22,9 @@ let blogSchema = mongoose.Schema({
html: String,
dev: String,
date_formatted: String,
changelist: String
changelist: String,
comments: [Comment]
});


let Blog = module.exports = mongoose.model('Blog', blogSchema)
Loading

0 comments on commit b5c4393

Please sign in to comment.