|
|
@@ -243,6 +243,27 @@ app.post("/nchar/startChangeMail", async (req, res) => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+app.post("/nchar/changeUserName", async (req, res) => {
|
|
|
+ await coreClient.NChar.changeUserName({
|
|
|
+ userName: req.body.userName
|
|
|
+ }).then((resp) => {
|
|
|
+ res.status(200).json(resp);
|
|
|
+ }).catch((err) => {
|
|
|
+ console.log("err:", err)
|
|
|
+ res.status(400).json("something-went-wrong");
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
+app.get("/nchar/getPastUserNameChanges", async (req, res) => {
|
|
|
+ await coreClient.NChar.getPastUserNameChanges()
|
|
|
+ .then((resp) => {
|
|
|
+ res.status(200).json(resp);
|
|
|
+ }).catch((err) => {
|
|
|
+ console.log("err:", err)
|
|
|
+ res.status(400).json("something-went-wrong");
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
const PORT = process.env.PORT || 5000;
|
|
|
|
|
|
app.listen(PORT, () => {
|