adding aws upload to the create post api

This commit is contained in:
Will Baumbach
2025-07-26 13:06:35 -05:00
parent 2704577d39
commit 54e960eaf6
8 changed files with 663 additions and 12 deletions

View File

@@ -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;