diff --git a/.gitignore b/.gitignore index 3bf5853f..042d3254 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /EasyDarwin.exe /EasyDarwin.exe~ /logs +/*.log node_modules *.db *.db.bak diff --git a/routers/record.go b/routers/record.go index d5c1a923..21b240dd 100644 --- a/routers/record.go +++ b/routers/record.go @@ -29,7 +29,7 @@ import ( */ /** - * @api {get} /api/vi/record/folders 获取所有录像文件夹 + * @api {get} /api/v1/record/folders 获取所有录像文件夹 * @apiGroup record * @apiName RecordFolders * @apiParam {Number} [start] 分页开始,从零开始 @@ -80,7 +80,7 @@ func (h *APIHandler) RecordFolders(c *gin.Context) { } /** - * @api {get} /api/vi/record/files 获取所有录像文件 + * @api {get} /api/v1/record/files 获取所有录像文件 * @apiGroup record * @apiName RecordFiles * @apiParam {Number} folder 录像文件所在的文件夹 diff --git a/routers/streams.go b/routers/streams.go index 690d91e4..358e04d1 100644 --- a/routers/streams.go +++ b/routers/streams.go @@ -16,7 +16,7 @@ import ( */ /** - * @api {get} /api/vi/stream/start 启动拉流 + * @api {get} /api/v1/stream/start 启动拉转推 * @apiGroup stream * @apiName StreamStart * @apiParam {String} url RTSP源地址 @@ -65,7 +65,7 @@ func (h *APIHandler) StreamStart(c *gin.Context) { } /** - * @api {get} /api/vi/stream/stop 停止拉流 + * @api {get} /api/v1/stream/stop 停止推流 * @apiGroup stream * @apiName StreamStop * @apiParam {String} id 拉流的ID diff --git a/routers/sys.go b/routers/sys.go index 715cfedc..2a81f6da 100644 --- a/routers/sys.go +++ b/routers/sys.go @@ -99,7 +99,7 @@ func (h *APIHandler) ModifyPassword(c *gin.Context) { } /** - * @api {get} /getserverinfo 获取平台运行信息 + * @api {get} /api/v1/getserverinfo 获取平台运行信息 * @apiGroup sys * @apiName GetServerInfo * @apiSuccess (200) {String} Hardware 硬件信息 @@ -122,7 +122,7 @@ func (h *APIHandler) GetServerInfo(c *gin.Context) { } /** - * @api {get} /restart 重启服务 + * @api {get} /api/v1/restart 重启服务 * @apiGroup sys * @apiName Restart * @apiUse simpleSuccess @@ -146,7 +146,7 @@ func (h *APIHandler) Restart(c *gin.Context) { */ /** - * @api {get} /login 登录 + * @api {get} /api/v1/login 登录 * @apiGroup sys * @apiName Login * @apiParam {String} username 用户名 @@ -183,7 +183,7 @@ func (h *APIHandler) Login(c *gin.Context) { } /** - * @api {get} /userInfo 获取当前登录用户信息 + * @api {get} /api/v1/userInfo 获取当前登录用户信息 * @apiGroup sys * @apiName UserInfo * @apiUse userInfo @@ -202,7 +202,7 @@ func (h *APIHandler) UserInfo(c *gin.Context) { } /** - * @api {get} /logout 登出 + * @api {get} /api/v1/logout 登出 * @apiGroup sys * @apiName Logout * @apiUse simpleSuccess diff --git a/www/apidoc/api_data.js b/www/apidoc/api_data.js index fc021281..3c35010a 100644 --- a/www/apidoc/api_data.js +++ b/www/apidoc/api_data.js @@ -1,7 +1,7 @@ define({ "api": [ { "type": "get", - "url": "/api/vi/record/files", + "url": "/api/v1/record/files", "title": "获取所有录像文件", "group": "record", "name": "RecordFiles", @@ -104,7 +104,7 @@ define({ "api": [ }, { "type": "get", - "url": "/api/vi/record/folders", + "url": "/api/v1/record/folders", "title": "获取所有录像文件夹", "group": "record", "name": "RecordFolders", @@ -427,8 +427,8 @@ define({ "api": [ }, { "type": "get", - "url": "/api/vi/stream/start", - "title": "启动拉流", + "url": "/api/v1/stream/start", + "title": "启动拉转推", "group": "stream", "name": "StreamStart", "parameter": { @@ -484,8 +484,8 @@ define({ "api": [ }, { "type": "get", - "url": "/api/vi/stream/stop", - "title": "停止拉流", + "url": "/api/v1/stream/stop", + "title": "停止推流", "group": "stream", "name": "StreamStop", "parameter": { @@ -516,7 +516,7 @@ define({ "api": [ }, { "type": "get", - "url": "/getserverinfo", + "url": "/api/v1/getserverinfo", "title": "获取平台运行信息", "group": "sys", "name": "GetServerInfo", @@ -560,7 +560,7 @@ define({ "api": [ }, { "type": "get", - "url": "/login", + "url": "/api/v1/login", "title": "登录", "group": "sys", "name": "Login", @@ -599,7 +599,7 @@ define({ "api": [ }, { "type": "get", - "url": "/logout", + "url": "/api/v1/logout", "title": "登出", "group": "sys", "name": "Logout", @@ -618,7 +618,7 @@ define({ "api": [ }, { "type": "get", - "url": "/restart", + "url": "/api/v1/restart", "title": "重启服务", "group": "sys", "name": "Restart", @@ -637,7 +637,7 @@ define({ "api": [ }, { "type": "get", - "url": "/userInfo", + "url": "/api/v1/userInfo", "title": "获取当前登录用户信息", "group": "sys", "name": "UserInfo", diff --git a/www/apidoc/api_data.json b/www/apidoc/api_data.json index a8e9668b..4adbe795 100644 --- a/www/apidoc/api_data.json +++ b/www/apidoc/api_data.json @@ -1,7 +1,7 @@ [ { "type": "get", - "url": "/api/vi/record/files", + "url": "/api/v1/record/files", "title": "获取所有录像文件", "group": "record", "name": "RecordFiles", @@ -104,7 +104,7 @@ }, { "type": "get", - "url": "/api/vi/record/folders", + "url": "/api/v1/record/folders", "title": "获取所有录像文件夹", "group": "record", "name": "RecordFolders", @@ -427,8 +427,8 @@ }, { "type": "get", - "url": "/api/vi/stream/start", - "title": "启动拉流", + "url": "/api/v1/stream/start", + "title": "启动拉转推", "group": "stream", "name": "StreamStart", "parameter": { @@ -484,8 +484,8 @@ }, { "type": "get", - "url": "/api/vi/stream/stop", - "title": "停止拉流", + "url": "/api/v1/stream/stop", + "title": "停止推流", "group": "stream", "name": "StreamStop", "parameter": { @@ -516,7 +516,7 @@ }, { "type": "get", - "url": "/getserverinfo", + "url": "/api/v1/getserverinfo", "title": "获取平台运行信息", "group": "sys", "name": "GetServerInfo", @@ -560,7 +560,7 @@ }, { "type": "get", - "url": "/login", + "url": "/api/v1/login", "title": "登录", "group": "sys", "name": "Login", @@ -599,7 +599,7 @@ }, { "type": "get", - "url": "/logout", + "url": "/api/v1/logout", "title": "登出", "group": "sys", "name": "Logout", @@ -618,7 +618,7 @@ }, { "type": "get", - "url": "/restart", + "url": "/api/v1/restart", "title": "重启服务", "group": "sys", "name": "Restart", @@ -637,7 +637,7 @@ }, { "type": "get", - "url": "/userInfo", + "url": "/api/v1/userInfo", "title": "获取当前登录用户信息", "group": "sys", "name": "UserInfo", diff --git a/www/apidoc/api_project.js b/www/apidoc/api_project.js index 28e4efcd..9c2c3e0c 100644 --- a/www/apidoc/api_project.js +++ b/www/apidoc/api_project.js @@ -25,8 +25,8 @@ define({ "apidoc": "0.3.0", "generator": { "name": "apidoc", - "time": "2018-12-03T05:17:28.228Z", + "time": "2018-12-03T05:50:19.289Z", "url": "http://apidocjs.com", - "version": "0.17.6" + "version": "0.17.7" } }); diff --git a/www/apidoc/api_project.json b/www/apidoc/api_project.json index 9b05e2a4..a0427aa4 100644 --- a/www/apidoc/api_project.json +++ b/www/apidoc/api_project.json @@ -25,8 +25,8 @@ "apidoc": "0.3.0", "generator": { "name": "apidoc", - "time": "2018-12-03T05:17:28.228Z", + "time": "2018-12-03T05:50:19.289Z", "url": "http://apidocjs.com", - "version": "0.17.6" + "version": "0.17.7" } } diff --git a/www/apidoc/locales/cs.js b/www/apidoc/locales/cs.js new file mode 100644 index 00000000..b7796d8f --- /dev/null +++ b/www/apidoc/locales/cs.js @@ -0,0 +1,25 @@ +define({ + cs: { + 'Allowed values:' : 'Povolené hodnoty:', + 'Compare all with predecessor': 'Porovnat vše s předchozími verzemi', + 'compare changes to:' : 'porovnat změny s:', + 'compared to' : 'porovnat s', + 'Default value:' : 'Výchozí hodnota:', + 'Description' : 'Popis', + 'Field' : 'Pole', + 'General' : 'Obecné', + 'Generated with' : 'Vygenerováno pomocí', + 'Name' : 'Název', + 'No response values.' : 'Nebyly vráceny žádné hodnoty.', + 'optional' : 'volitelné', + 'Parameter' : 'Parametr', + 'Permission:' : 'Oprávnění:', + 'Response' : 'Odpověď', + 'Send' : 'Odeslat', + 'Send a Sample Request' : 'Odeslat ukázkový požadavek', + 'show up to version:' : 'zobrazit po verzi:', + 'Size range:' : 'Rozsah velikosti:', + 'Type' : 'Typ', + 'url' : 'url' + } +}); diff --git a/www/apidoc/locales/locale.js b/www/apidoc/locales/locale.js index ba82385a..3530705e 100644 --- a/www/apidoc/locales/locale.js +++ b/www/apidoc/locales/locale.js @@ -1,5 +1,6 @@ define([ './locales/ca.js', + './locales/cs.js', './locales/de.js', './locales/es.js', './locales/fr.js',