From 380887c5d312406c8d5b64f45451590d3345db8c Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 2 Dec 2023 15:02:00 +0800 Subject: [PATCH] =?UTF-8?q?http=20api=E5=9B=9E=E5=A4=8D=E6=94=B9=E6=88=90?= =?UTF-8?q?=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebApi.cpp | 2 +- server/WebApi.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/WebApi.cpp b/server/WebApi.cpp index bc55486b..fa3eec9e 100755 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -719,7 +719,7 @@ void installWebApi() { return 0; }); - val["msg"] = "服务器将在一秒后自动重启"; + val["msg"] = "MediaServer will reboot in on 1 second"; }); #else //增加Windows下的重启代码 diff --git a/server/WebApi.h b/server/WebApi.h index ea6caa81..346a6767 100755 --- a/server/WebApi.h +++ b/server/WebApi.h @@ -218,7 +218,7 @@ bool checkArgs(Args &args, const First &first, const KeyTypes &...keys) { //检查http url中或body中或http header参数是否为空的宏 #define CHECK_ARGS(...) \ if(!checkArgs(allArgs,##__VA_ARGS__)){ \ - throw InvalidArgsException("缺少必要参数:" #__VA_ARGS__); \ + throw InvalidArgsException("Required parameter missed: " #__VA_ARGS__); \ } // 检查http参数中是否附带secret密钥的宏,127.0.0.1的ip不检查密钥 @@ -231,7 +231,7 @@ bool checkArgs(Args &args, const First &first, const KeyTypes &...keys) { } \ CHECK_ARGS("secret"); \ if (api_secret != allArgs["secret"]) { \ - throw AuthException("secret错误"); \ + throw AuthException("Incorrect secret"); \ } \ } while(false);