backedn converted to ts

This commit is contained in:
QkoSad
2023-07-27 15:58:35 +03:00
parent 3bf4e9fc56
commit 40051f9d5e
18 changed files with 1394 additions and 29668 deletions
+4 -2
View File
@@ -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