backedn converted to ts
This commit is contained in:
+4
-2
@@ -1,4 +1,5 @@
|
||||
const mongoose = require("mongoose");
|
||||
import mongoose from "mongoose";
|
||||
|
||||
const Schema = mongoose.Schema;
|
||||
|
||||
const PostSchema = new Schema({
|
||||
@@ -49,4 +50,5 @@ const PostSchema = new Schema({
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = mongoose.model("post", PostSchema);
|
||||
const Post = mongoose.model("post", PostSchema);
|
||||
export default Post
|
||||
|
||||
Reference in New Issue
Block a user