blixify-server 0.2.11 → 0.2.13
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authWrapper.d.ts","sourceRoot":"","sources":["../../src/apis/authWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;GAGG;AACH,qBAAa,WAAW;IACtB,OAAO,EAAE,GAAG,CAAM;IAClB,MAAM,UAAS;IACf,GAAG,EAAE,UAAU,CAAC;gBAEJ,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU;IAM1D,mBAAmB,QAAe,GAAG,OAAO,GAAG,mBAyB7C;IAEF,kBAAkB,QAAe,GAAG,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"authWrapper.d.ts","sourceRoot":"","sources":["../../src/apis/authWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;GAGG;AACH,qBAAa,WAAW;IACtB,OAAO,EAAE,GAAG,CAAM;IAClB,MAAM,UAAS;IACf,GAAG,EAAE,UAAU,CAAC;gBAEJ,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU;IAM1D,mBAAmB,QAAe,GAAG,OAAO,GAAG,mBAyB7C;IAEF,kBAAkB,QAAe,GAAG,OAAO,GAAG,mBAW5C;IAEF,kBAAkB,QAAe,GAAG,OAAO,GAAG,mBAW5C;IAEF,eAAe,QACR,GAAG,OACH,GAAG,aACG,MAAM,QAAQ,GAAG,CAAC,mBAiB7B;IAEF,kBAAkB,QACX,GAAG,OACH,GAAG,aACG,MAAM,QAAQ,GAAG,CAAC,mBAa7B;IAEF,IAAI,YAiDF;CACH"}
|
package/dist/apis/authWrapper.js
CHANGED
|
@@ -51,9 +51,10 @@ class AuthWrapper {
|
|
|
51
51
|
const adminAuth = this.fbAdmin.auth();
|
|
52
52
|
try {
|
|
53
53
|
const userId = req.body.userId;
|
|
54
|
+
const disable = req.body.disable;
|
|
54
55
|
if (!userId)
|
|
55
56
|
throw "Invalid Configuration";
|
|
56
|
-
yield adminAuth.updateUser(userId, { disabled: true });
|
|
57
|
+
yield adminAuth.updateUser(userId, { disabled: disable ? true : false });
|
|
57
58
|
res.send({ success: true });
|
|
58
59
|
}
|
|
59
60
|
catch (err) {
|
|
@@ -79,9 +80,13 @@ class AuthWrapper {
|
|
|
79
80
|
try {
|
|
80
81
|
const userId = req.body.userId;
|
|
81
82
|
const email = req.body.email;
|
|
83
|
+
const password = req.body.password;
|
|
82
84
|
if (!userId || !email)
|
|
83
85
|
throw "Invalid Configuration";
|
|
84
|
-
|
|
86
|
+
const data = { email: email };
|
|
87
|
+
if (password)
|
|
88
|
+
data["password"] = password;
|
|
89
|
+
yield adminAuth.updateUser(userId, data);
|
|
85
90
|
if (workflow)
|
|
86
91
|
yield workflow();
|
|
87
92
|
res.send({ success: true });
|
|
@@ -111,6 +116,7 @@ class AuthWrapper {
|
|
|
111
116
|
/**
|
|
112
117
|
* @Input
|
|
113
118
|
* userId - string
|
|
119
|
+
* disable - boolean
|
|
114
120
|
*/
|
|
115
121
|
router.post("/disable", (req, res) => {
|
|
116
122
|
this.initDisableAccount(req, res);
|
|
@@ -134,6 +140,7 @@ class AuthWrapper {
|
|
|
134
140
|
* @Input
|
|
135
141
|
* userId - string
|
|
136
142
|
* email - string
|
|
143
|
+
* password? - string
|
|
137
144
|
*/
|
|
138
145
|
router.post("/email", (req, res) => {
|
|
139
146
|
this.initUpdateEmail(req, res);
|