mirror of
https://github.com/sstent/expressmongotest.git
synced 2026-01-26 09:02:33 +00:00
added private public view to profile -- todo : add same for article view
This commit is contained in:
@@ -2,8 +2,7 @@ var Schema = require('mongoose').Schema;
|
||||
|
||||
var ArticleSchema = new Schema({
|
||||
title: {
|
||||
type: String,
|
||||
unique: true
|
||||
type: String
|
||||
},
|
||||
body: String,
|
||||
author: {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
var mongoose = require('mongoose');
|
||||
|
||||
var UserSchema = new mongoose.Schema({
|
||||
username: {type: String, unique: true},
|
||||
username: {type: String, unique: true, required: true},
|
||||
name: String,
|
||||
password: String,
|
||||
password: String
|
||||
});
|
||||
|
||||
UserSchema.methods.recentArticles = function(callback) {
|
||||
|
||||
Reference in New Issue
Block a user