This commit is contained in:
unknown
2024-10-06 13:24:29 +08:00
parent 3810d24315
commit cb62638d55
2 changed files with 6 additions and 2 deletions

View File

@@ -1233,7 +1233,7 @@ function view_project(projectName, projectType) {
var clearButton = $('<a class="btn btn-success btn-sm" style="padding:0 5px 0 5px;margin-left:8px">' + JSLang[lang].clear + '</a>')
var clearAllButton = $('<a class="btn btn-warning btn-sm" style="padding:0 5px 0 5px;margin-left:8px">' + JSLang[lang].clearAll + '</a>')
httpAPIButton.click(function() {
var text = "URL: " + window.location.href.replace("projects", "") + "api/v1/getData?user=" + globalUserName + "&password=" + globalProjectPass + "&project=" + globalProjectName + "&topic=" + "[想要获取的主题]" + "&num=" + "[想要获取的最新消息数量]"
var text = "URL: " + window.location.href.replace("projects-mixly", "").replace("projects", "") + "api/v1/getData?user=" + globalUserName + "&password=" + globalProjectPass + "&project=" + globalProjectName + "&topic=" + "[想要获取的主题]" + "&num=" + "[想要获取的最新消息数量]"
var text = "Method: GET<br>" + text
var text = text + "<br>" + "一般情况下数据更新频率为30秒/次,手动保存项目会立即更新数据。"
// dialog, 自动换行

View File

@@ -956,7 +956,11 @@ var mixioServer = function() {
{
res.send('{"status":"failed"}')
}
else if (row && (row["password"] == password)) {
else if ((!row) && (password!="MixIO_public" || user[0]!="@"))
{
res.send('{"status":"failed"}')
}
else if ( (password=="MixIO_public" && user[0]=="@") || (row && (row["password"] == password)) ) {
db.get("select * from project where username = ? and projectName = ?", [user, project], function(err, row) {
if (err)
{