assisweb 5.0.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +14 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -18,11 +18,20 @@ const registerSchema = new mongoose.Schema({
18
18
  })
19
19
 
20
20
 
21
-
22
-
21
+ module.exports.Accounts = Accounts = mongoose.model("Accounts" , registerSchema)
23
22
  module.exports = {
24
- UserData : function(Email , Type) {
25
- console.log(mongoose.Collection.getIndexes("Accounts"))
26
-
23
+ UserData : async function(Email , Type) {
24
+ await Accounts.findOne({MyEmail: Email} , (err , data) => {
25
+ if(err) {
26
+ return;
27
+ }
28
+
29
+ if(data) {
30
+ if(Type === "Name")return data.MyName
31
+ if(Type === "Email")return data.MyEmail
32
+ if(Type === "ID")return data.MyID
33
+ }else return console.log("Assis Error : Email Not Found")
34
+
35
+ })
27
36
  }
28
37
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "mongoose": "^6.2.8"
4
4
  },
5
5
  "name": "assisweb",
6
- "version": "5.0.0",
6
+ "version": "8.0.0",
7
7
  "main": "index.js",
8
8
  "devDependencies": {},
9
9
  "scripts": {