|
|
@@ -31,7 +31,7 @@ app.get("/healthCheck", (req, res) => {
|
|
|
});
|
|
|
|
|
|
//NAuth
|
|
|
-app.post("/changePassword", async (req, res) => {
|
|
|
+app.post("/nauth/changePassword", async (req, res) => {
|
|
|
await nauthClient.changePassword({
|
|
|
newPassword: req.body.newPassword,
|
|
|
oldPassword: req.body.oldPassword
|
|
|
@@ -42,7 +42,7 @@ app.post("/changePassword", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/login", async (req, res) => {
|
|
|
+app.post("/nauth/login", async (req, res) => {
|
|
|
await nauthClient.login({
|
|
|
mail: req.body.mail,
|
|
|
password: req.body.password
|
|
|
@@ -53,7 +53,7 @@ app.post("/login", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/mailVerify", async (req, res) => {
|
|
|
+app.post("/nauth/mailVerify", async (req, res) => {
|
|
|
await nauthClient.mailVerify({
|
|
|
hash: req.body.hash,
|
|
|
code: req.body.code
|
|
|
@@ -64,7 +64,7 @@ app.post("/mailVerify", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.get("/me", async (req, res) => {
|
|
|
+app.get("/nauth/me", async (req, res) => {
|
|
|
await nauthClient.me()
|
|
|
.then((resp) => {
|
|
|
res.status(200).json(resp);
|
|
|
@@ -73,7 +73,7 @@ app.get("/me", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/refreshToken", async (req, res) => {
|
|
|
+app.post("/nauth/refreshToken", async (req, res) => {
|
|
|
await nauthClient.refreshToken({
|
|
|
token: req.body.token
|
|
|
}).then((resp) => {
|
|
|
@@ -83,7 +83,7 @@ app.post("/refreshToken", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/register", async (req, res) => {
|
|
|
+app.post("/nauth/register", async (req, res) => {
|
|
|
await nauthClient.register({
|
|
|
isApproveContracts: req.body.isApproveContracts,
|
|
|
phoneAreaCode: req.body.phoneAreaCode,
|
|
|
@@ -101,7 +101,7 @@ app.post("/register", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/reSendCodeSMSOTP", async (req, res) => {
|
|
|
+app.post("/nauth/reSendCodeSMSOTP", async (req, res) => {
|
|
|
await nauthClient.reSendCodeSMSOTP({
|
|
|
mail: req.body.mail
|
|
|
}).then((resp) => {
|
|
|
@@ -111,7 +111,7 @@ app.post("/reSendCodeSMSOTP", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/resetNewPassword", async (req, res) => {
|
|
|
+app.post("/nauth/resetNewPassword", async (req, res) => {
|
|
|
await nauthClient.resetNewPassword({
|
|
|
newPassword: req.body.newPassword,
|
|
|
mail: req.body.mail,
|
|
|
@@ -123,7 +123,7 @@ app.post("/resetNewPassword", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/resetPasswordCheckCode", async (req, res) => {
|
|
|
+app.post("/nauth/resetPasswordCheckCode", async (req, res) => {
|
|
|
await nauthClient.resetPasswordCheckCode({
|
|
|
mail: req.body.mail,
|
|
|
code: req.body.code
|
|
|
@@ -134,7 +134,7 @@ app.post("/resetPasswordCheckCode", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/smsOTP", async (req, res) => {
|
|
|
+app.post("/nauth/smsOTP", async (req, res) => {
|
|
|
await nauthClient.smsOTP({
|
|
|
mail: req.body.mail,
|
|
|
code: req.body.code
|
|
|
@@ -145,7 +145,7 @@ app.post("/smsOTP", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/startMailVerify", async (req, res) => {
|
|
|
+app.post("/nauth/startMailVerify", async (req, res) => {
|
|
|
await nauthClient.startMailVerify({
|
|
|
mail: req.body.mail
|
|
|
}).then((resp) => {
|
|
|
@@ -155,7 +155,7 @@ app.post("/startMailVerify", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/startResetPassword", async (req, res) => {
|
|
|
+app.post("/nauth/startResetPassword", async (req, res) => {
|
|
|
await nauthClient.startResetPassword({
|
|
|
mail: req.body.mail
|
|
|
}).then((resp) => {
|
|
|
@@ -166,7 +166,7 @@ app.post("/startResetPassword", async (req, res) => {
|
|
|
});
|
|
|
|
|
|
//NChar
|
|
|
-app.post("/addPhoneNumber", async (req, res) => {
|
|
|
+app.post("/nchar/addPhoneNumber", async (req, res) => {
|
|
|
await ncharClient.addPhoneNumber({
|
|
|
phoneAreaCode: req.body.phoneAreaCode,
|
|
|
phone: req.body.phone
|
|
|
@@ -177,7 +177,7 @@ app.post("/addPhoneNumber", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/checkChangeMailCode", async (req, res) => {
|
|
|
+app.post("/nchar/checkChangeMailCode", async (req, res) => {
|
|
|
await ncharClient.checkChangeMailCode({
|
|
|
mail: req.body.mail,
|
|
|
code: req.body.code
|
|
|
@@ -188,7 +188,7 @@ app.post("/checkChangeMailCode", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/deletePhoneNumber", async (req, res) => {
|
|
|
+app.post("/nchar/deletePhoneNumber", async (req, res) => {
|
|
|
await ncharClient.deletePhoneNumber({
|
|
|
phoneAreaCode: req.body.phoneAreaCode,
|
|
|
phone: req.body.phone
|
|
|
@@ -199,7 +199,7 @@ app.post("/deletePhoneNumber", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.get("/me", async (req, res) => {
|
|
|
+app.get("/nchar/me", async (req, res) => {
|
|
|
await ncharClient.me()
|
|
|
.then((resp) => {
|
|
|
res.status(200).json(resp);
|
|
|
@@ -208,7 +208,7 @@ app.get("/me", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/setPrimaryPhoneNumber", async (req, res) => {
|
|
|
+app.post("/nchar/setPrimaryPhoneNumber", async (req, res) => {
|
|
|
await ncharClient.setPrimaryPhoneNumber({
|
|
|
phoneAreaCode: req.body.phoneAreaCode,
|
|
|
phone: req.body.phone
|
|
|
@@ -219,7 +219,7 @@ app.post("/setPrimaryPhoneNumber", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-app.post("/startChangeMail", async (req, res) => {
|
|
|
+app.post("/nchar/startChangeMail", async (req, res) => {
|
|
|
await ncharClient.startChangeMail({
|
|
|
mail: req.body.mail
|
|
|
}).then((resp) => {
|