adding aws upload to the create post api
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
|
||||
import mongoose from 'mongoose';
|
||||
import User from './userModel';
|
||||
|
||||
const postSchema = new mongoose.Schema({
|
||||
user: {
|
||||
type: User,
|
||||
userID: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
date: {
|
||||
type: Date,
|
||||
required: true
|
||||
},
|
||||
photo: {
|
||||
type: String,
|
||||
@@ -25,6 +23,6 @@ const postSchema = new mongoose.Schema({
|
||||
}
|
||||
});
|
||||
|
||||
const Post = mongoose.model('User', postSchema);
|
||||
const Post = mongoose.model('Post', postSchema);
|
||||
|
||||
export default Post;
|
||||
Reference in New Issue
Block a user