-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpostdata.js
50 lines (44 loc) · 896 Bytes
/
postdata.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const mongoose = require("mongoose");
const bcrypt = require("bcryptjs");
const jwt = require("jsonwebtoken");
const res = require("express/lib/response");
const slug = require('mongoose-slug-generator');
const domPurifier = require('dompurify');
const { JSDOM } = require('jsdom');
const post1 = new mongoose.Schema({
title: {
type: String,
required: true,
},
attach_links: {
type: String,
required: true,
},
main_link: {
type: String,
required: true,
},
importance: {
type: String,
required: true,
},
phone: {
type: Number,
required: true,
},
description: {
type: String,
required: true,
},
date: {
type: String,
required: true,
},
img:
{
data: Buffer,
contentType: String,
}
});
const post_data = new mongoose.model("post_data", post1);
module.exports = post_data;