|
@@ -8493,6 +8493,27 @@ router.route('/getTypeTeacher').all((req,res,next)=>{
|
|
getmysql(req, res, "getTypeTeacher", json["cid"], json["name"], json["userid"]);
|
|
getmysql(req, res, "getTypeTeacher", json["cid"], json["name"], json["userid"]);
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+//删除会话记录
|
|
|
|
+router.route("/deleteChat").all((req,res,next)=>{
|
|
|
|
+ postmysql(req, res, "deleteChat"); // id 会话id
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+//添加会话记录
|
|
|
|
+router.route("/addChat").all((req,res,next)=>{
|
|
|
|
+ postmysql(req, res, "addChat"); // uid 用户id n 会话名称 cid chatid
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+//添加会话记录
|
|
|
|
+router.route("/updateChat").all((req,res,next)=>{
|
|
|
|
+ postmysql(req, res, "updateChat"); // id 会话id n 会话名称
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+//获取会话记录
|
|
|
|
+router.route('/getChatHistory').all((req,res,next)=>{
|
|
|
|
+ var json = queryString(req.url);
|
|
|
|
+ getmysql(req, res, "getChatHistory", json["uid"], json["n"], json["page"], json["num"]); //用户id,会话名称,页码,页数
|
|
|
|
+})
|
|
|
|
+
|
|
function generateAPIKey(username) {
|
|
function generateAPIKey(username) {
|
|
let timeStamp = new Date().getTime();
|
|
let timeStamp = new Date().getTime();
|
|
|
|
|