assisweb 9.5.0 → 12.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 +64 -14
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -22,18 +22,68 @@ const Accounts = mongoose.model("Accounts" , registerSchema)
22
22
 
23
23
 
24
24
  module.exports = {
25
- UserData : function(Email , Type) {
26
- Accounts.findOne({MyEmail: Email} , (err , data) => {
27
- if(err) {
28
- return;
29
- }
30
-
31
- if(data) {
32
- if(Type === "Name")return data.MyName
33
- if(Type === "Email")return data.MyEmail
34
- if(Type === "ID")return data.MyID
35
- }else return console.log("Assis Error : Email Not Found")
36
-
37
- })
38
- }
25
+ CreateUserLogin : function(Email, Pass , ConsoleNot) {
26
+ // ConNot Not Found
27
+ if(!ConsoleNot) {
28
+ Accounts.findOne({MyEmail: Email} , (err , data) => {
29
+ if(err) {
30
+ return console.log("Assis Error : Not Found Error")
31
+ }
32
+ if(data) {
33
+ if(data.MyPass.toString === Pass) {
34
+ return true
35
+ }else {
36
+ console.log("Assis Error : Password Is Invaild")
37
+ return false
38
+ }
39
+ }else return console.log("Assis Error : Invaild Email")
40
+ })
41
+ //ConNot true
42
+ }else if(ConsoleNot === true) {
43
+ Accounts.findOne({MyEmail: Email} , (err , data) => {
44
+ if(err) {
45
+ return;
46
+ }
47
+ if(data) {
48
+ if(data.MyPass.toString === Pass) {
49
+ return true
50
+ }else {
51
+ return false
52
+ }
53
+ }else return;
54
+ })
55
+ //ContNot false
56
+ }else if(ConsoleNot === false) {
57
+ Accounts.findOne({MyEmail: Email} , (err , data) => {
58
+ if(err) {
59
+ return console.log("Assis Error : Not Found Error")
60
+ }
61
+ if(data) {
62
+ if(data.MyPass.toString === Pass) {
63
+ return true
64
+ }else {
65
+ console.log("Assis Error : Password Is Invaild")
66
+ return false
67
+ }
68
+ }else return console.log("Assis Error : Invaild Email")
69
+ })
70
+ }else return console.log("Assis Error : 'Email','Password','true Or false' ")
71
+ },
72
+
73
+
74
+ Data(Email , Pass) {
75
+ Accounts.findOne({MyEmail: Email} , (err , data) => {
76
+ if(err) {
77
+ return;
78
+ }
79
+ if(data) {
80
+ return data.MyName.toString()
81
+ }else return console.log("Assis Error : Email is Invaild")
82
+ })
83
+ }
84
+
85
+
86
+
87
+
88
+
39
89
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "mongoose": "^6.2.8"
4
4
  },
5
5
  "name": "assisweb",
6
- "version": "9.5.0",
6
+ "version": "12.0.0",
7
7
  "main": "index.js",
8
8
  "devDependencies": {},
9
9
  "scripts": {