You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
387 B
16 lines
387 B
const mongoose = require('mongoose');
|
|
const Schema = mongoose.Schema;
|
|
|
|
let user =
|
|
new Schema(
|
|
{
|
|
username: {type: String, required: true, max: 100},
|
|
hash: {type: String, required: true, max: 100}
|
|
}
|
|
);
|
|
|
|
const User = module.exports = mongoose.model('favorite', user, 'mangareader');
|
|
module.exports.get = (callback, limit)=>
|
|
{
|
|
User.find(callback).limit(limit);
|
|
} |