assisweb 8.0.0 → 9.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +13 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
const mongoose = require('mongoose')
|
2
2
|
|
3
3
|
|
4
|
-
mongoose.connect("mongodb+srv://Assis:200420082018@cluster0.el3tr.mongodb.net/myFirstDatabase?retryWrites=true&w=majority").then(() => {
|
4
|
+
mongoose.connect("mongodb+srv://Assis:200420082018@cluster0.el3tr.mongodb.net/myFirstDatabase?retryWrites=true&w=majority",{useNewUrlParser: true, useUnifiedTopology:true}).then(() => {
|
5
5
|
|
6
6
|
}).catch(err => {
|
7
7
|
console.log(err)
|
@@ -18,7 +18,18 @@ const registerSchema = new mongoose.Schema({
|
|
18
18
|
})
|
19
19
|
|
20
20
|
|
21
|
-
|
21
|
+
const Accounts = mongoose.Model("Accounts" , registerSchema)
|
22
|
+
|
23
|
+
const Nothing = new Accounts({
|
24
|
+
MyEmail: "a",
|
25
|
+
MyPass: "a",
|
26
|
+
MyName: "a",
|
27
|
+
MyDiscordID: "a",
|
28
|
+
DiscordBotToken: "a",
|
29
|
+
ChannelID: "a",
|
30
|
+
MyID:"a"
|
31
|
+
})
|
32
|
+
Nothing.save()
|
22
33
|
module.exports = {
|
23
34
|
UserData : async function(Email , Type) {
|
24
35
|
await Accounts.findOne({MyEmail: Email} , (err , data) => {
|