@7365admin1/core 3.34.0 → 3.34.2
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.
- package/CHANGELOG.md +12 -0
- package/dist/index.js +33 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -14686,6 +14686,10 @@ function useVerificationController() {
|
|
|
14686
14686
|
}
|
|
14687
14687
|
async function createSimpleUserInvite(req, res, next) {
|
|
14688
14688
|
const payload = { ...req.body };
|
|
14689
|
+
logger22.log({
|
|
14690
|
+
level: "info",
|
|
14691
|
+
message: `[invite/user] payload: ${JSON.stringify(payload)}`
|
|
14692
|
+
});
|
|
14689
14693
|
const validation = Joi16.object({
|
|
14690
14694
|
email: Joi16.string().email().required(),
|
|
14691
14695
|
app: Joi16.array().items(Joi16.string()).min(1).required(),
|
|
@@ -14725,16 +14729,21 @@ function useVerificationController() {
|
|
|
14725
14729
|
siteName
|
|
14726
14730
|
}
|
|
14727
14731
|
});
|
|
14728
|
-
|
|
14732
|
+
const responseBody = {
|
|
14729
14733
|
message: "Successfully invited user.",
|
|
14730
14734
|
totalInvites: verificationIds.length,
|
|
14731
14735
|
verificationIds
|
|
14736
|
+
};
|
|
14737
|
+
logger22.log({
|
|
14738
|
+
level: "info",
|
|
14739
|
+
message: `[invite/user] response: ${JSON.stringify(responseBody)}`
|
|
14732
14740
|
});
|
|
14741
|
+
res.status(201).json(responseBody);
|
|
14733
14742
|
return;
|
|
14734
14743
|
} catch (error2) {
|
|
14735
14744
|
logger22.log({
|
|
14736
14745
|
level: "error",
|
|
14737
|
-
message:
|
|
14746
|
+
message: `[invite/user] error for payload ${JSON.stringify(payload)}: ${error2.message}`
|
|
14738
14747
|
});
|
|
14739
14748
|
next(error2);
|
|
14740
14749
|
return;
|
|
@@ -14742,6 +14751,10 @@ function useVerificationController() {
|
|
|
14742
14751
|
}
|
|
14743
14752
|
async function createSimpleMemberInvite(req, res, next) {
|
|
14744
14753
|
const payload = { ...req.body };
|
|
14754
|
+
logger22.log({
|
|
14755
|
+
level: "info",
|
|
14756
|
+
message: `[invite/member] payload: ${JSON.stringify(payload)}`
|
|
14757
|
+
});
|
|
14745
14758
|
const validation = Joi16.object({
|
|
14746
14759
|
email: Joi16.string().email().required(),
|
|
14747
14760
|
app: Joi16.string().optional().allow("", null),
|
|
@@ -14779,14 +14792,19 @@ function useVerificationController() {
|
|
|
14779
14792
|
siteName
|
|
14780
14793
|
}
|
|
14781
14794
|
});
|
|
14782
|
-
|
|
14795
|
+
const responseBody = {
|
|
14783
14796
|
message: "Successfully invited member."
|
|
14797
|
+
};
|
|
14798
|
+
logger22.log({
|
|
14799
|
+
level: "info",
|
|
14800
|
+
message: `[invite/member] response: ${JSON.stringify(responseBody)}`
|
|
14784
14801
|
});
|
|
14802
|
+
res.status(201).json(responseBody);
|
|
14785
14803
|
return;
|
|
14786
14804
|
} catch (error2) {
|
|
14787
14805
|
logger22.log({
|
|
14788
14806
|
level: "error",
|
|
14789
|
-
message:
|
|
14807
|
+
message: `[invite/member] error for payload ${JSON.stringify(payload)}: ${error2.message}`
|
|
14790
14808
|
});
|
|
14791
14809
|
next(error2);
|
|
14792
14810
|
return;
|
|
@@ -14794,6 +14812,10 @@ function useVerificationController() {
|
|
|
14794
14812
|
}
|
|
14795
14813
|
async function createServiceProviderInvite(req, res, next) {
|
|
14796
14814
|
const payload = req.body;
|
|
14815
|
+
logger22.log({
|
|
14816
|
+
level: "info",
|
|
14817
|
+
message: `[service-providers/invite] payload: ${JSON.stringify(payload)}`
|
|
14818
|
+
});
|
|
14797
14819
|
const validation = Joi16.object({
|
|
14798
14820
|
email: Joi16.string().email().required(),
|
|
14799
14821
|
orgId: Joi16.string().hex().required(),
|
|
@@ -14833,14 +14855,19 @@ function useVerificationController() {
|
|
|
14833
14855
|
secure: true,
|
|
14834
14856
|
maxAge: 4 * 60 * 60 * 1e3
|
|
14835
14857
|
};
|
|
14836
|
-
|
|
14858
|
+
const responseBody = {
|
|
14837
14859
|
message: "Successfully invited service provider."
|
|
14860
|
+
};
|
|
14861
|
+
logger22.log({
|
|
14862
|
+
level: "info",
|
|
14863
|
+
message: `[service-providers/invite] response: ${JSON.stringify(responseBody)}`
|
|
14838
14864
|
});
|
|
14865
|
+
res.cookie("service-provider-email", email, cookieOptions).json(responseBody);
|
|
14839
14866
|
return;
|
|
14840
14867
|
} catch (error2) {
|
|
14841
14868
|
logger22.log({
|
|
14842
14869
|
level: "error",
|
|
14843
|
-
message: `
|
|
14870
|
+
message: `[service-providers/invite] error for payload ${JSON.stringify(payload)}: ${error2.message}`
|
|
14844
14871
|
});
|
|
14845
14872
|
next(error2);
|
|
14846
14873
|
return;
|