transfer project in github
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
const mongoose = require('mongoose')
|
||||
const mongoosePaginate = require('mongoose-paginate-v2');
|
||||
|
||||
function image(img) {
|
||||
return '/uploads/images/slider/' + img
|
||||
}
|
||||
|
||||
const SliderSchema = mongoose.Schema({
|
||||
image: {type: String, get: image},
|
||||
caption: String
|
||||
})
|
||||
|
||||
SliderSchema.plugin(mongoosePaginate);
|
||||
|
||||
module.exports = mongoose.model('Slide', SliderSchema)
|
||||
Reference in New Issue
Block a user