后台:日志修改

This commit is contained in:
luying
2021-12-21 15:16:11 +08:00
parent ebf0c1c398
commit d11beb19b7
5 changed files with 366 additions and 358 deletions

View File

@@ -45,7 +45,7 @@ Filter.prototype.after = function (err: Error, routeRecord: RouteRecord, msg: an
let dicApi = gameData.apiByUrl.get(route); let dicApi = gameData.apiByUrl.get(route);
if(dicApi.type != GM_API_TYPE.find) { if(dicApi.type != GM_API_TYPE.find) {
GMRecordModel.createRecord(uid, route, JSON.stringify(msg||{}), JSON.stringify(resp||{})); GMRecordModel.createRecord(uid, this.app.get('env'), route, JSON.stringify(msg||{}), JSON.stringify(resp||{}));
} }
next(err); next(err);
}; };

View File

@@ -45,7 +45,7 @@ module.exports = () => {
ctx.user = user; ctx.user = user;
await next(); await next();
if(dicApi.type != GM_API_TYPE.find) { if(dicApi.type != GM_API_TYPE.find) {
GMRecordModel.createRecord(user?user.uid:0, ctx.request.url, JSON.stringify(ctx.request.body||{}), JSON.stringify(ctx.body||{})); GMRecordModel.createRecord(user?user.uid:0, ctx.app.config.realEnv, ctx.request.url, JSON.stringify(ctx.request.body||{}), JSON.stringify(ctx.body||{}));
} }
}; };
}; };

View File

@@ -1,5 +1,6 @@
import BaseModel from './BaseModel'; import BaseModel from './BaseModel';
import { index, getModelForClass, prop, DocumentType, ReturnModelType, mongoose } from '@typegoose/typegoose'; import { index, getModelForClass, prop, DocumentType, ReturnModelType, mongoose } from '@typegoose/typegoose';
import { gameData } from '../pubUtils/data';
/** /**
* GM用户组接口 * GM用户组接口
@@ -12,17 +13,24 @@ export default class GMRecord extends BaseModel {
@prop({ required: true }) @prop({ required: true })
uid: number; uid: number;
@prop({ required: true })
env: string;
@prop({ required: true }) @prop({ required: true })
api: string; api: string;
@prop({ required: true })
apiName: string;
@prop({ required: true }) @prop({ required: true })
body: string; body: string;
@prop({ required: true }) @prop({ required: true })
result: string; result: string;
public static async createRecord(uid: number, api: string, body: string, result: string) { public static async createRecord(uid: number, env: string, api: string, body: string, result: string) {
const r = await GMRecordModel.insertMany({uid, api, body, result}); let dicApi = gameData.apiByUrl.get(api);
const r = await GMRecordModel.insertMany({uid, env, api, apiName: dicApi?.name, body, result});
return r; return r;
} }

View File

@@ -22,445 +22,445 @@
}, },
{ {
"id": 4, "id": 4,
"api": "/api/upload/hotupdate",
"name": "上传热更新",
"module": "upload",
"type": "update"
},
{
"id": 5,
"api": "/api/upload/uploadjson",
"name": "上传json",
"module": "upload",
"type": "update"
},
{
"id": 6,
"api": "/api/upload/reloadresource",
"name": "加载资源",
"module": "upload",
"type": "update"
},
{
"id": 7,
"api": "/api/gmaccount/getgmlist",
"name": "获取gm账号列表",
"module": "gmaccount",
"type": "find"
},
{
"id": 8,
"api": "/api/gmaccount/createaccount",
"name": "创建gm账号",
"module": "gmaccount",
"type": "add"
},
{
"id": 9,
"api": "/api/gmaccount/savegmgrouptouser",
"name": "将账号组保存至账号",
"module": "gmaccount",
"type": "update"
},
{
"id": 10,
"api": "/api/gmaccount/getgrouplist",
"name": "获取账号组列表",
"module": "gmaccount",
"type": "find"
},
{
"id": 11,
"api": "/api/gmaccount/getapilist",
"name": "获取api列表",
"module": "gmaccount",
"type": "find"
},
{
"id": 12,
"api": "/api/gmaccount/creategmgroup",
"name": "创建账号组",
"module": "gmaccount",
"type": "add"
},
{
"id": 13,
"api": "/api/gmaccount/savegmgroup",
"name": "保存账号组",
"module": "gmaccount",
"type": "update"
},
{
"id": 14,
"api": "/api/gmaccount/saveapitogroup",
"name": "将api保存至账号组",
"module": "gmaccount",
"type": "update"
},
{
"id": 15,
"api": "/api/users/getuserlist",
"name": "获取玩家账号列表",
"module": "user",
"type": "find"
},
{
"id": 16,
"api": "/api/users/fixsms",
"name": "固定玩家短信",
"module": "user",
"type": "update"
},
{
"id": 17,
"api": "/api/users/getrolelist",
"name": "获取玩家角色列表",
"module": "user",
"type": "find"
},
{
"id": 18,
"api": "/api/users/deleterole",
"name": "删除角色",
"module": "user",
"type": "delete"
},
{
"id": 19,
"api": "/api/users/setwar",
"name": "设置关卡",
"module": "user",
"type": "update"
},
{
"id": 20,
"api": "/api/users/getherolist",
"name": "获取玩家武将列表",
"module": "user",
"type": "find"
},
{
"id": 21,
"api": "/api/users/deletehero",
"name": "删除武将",
"module": "user",
"type": "delete"
},
{
"id": 22,
"api": "/api/users/getequiplist",
"name": "获取玩家装备列表",
"module": "user",
"type": "find"
},
{
"id": 23,
"api": "/api/users/getitemlist",
"name": "获取玩家道具列表",
"module": "user",
"type": "find"
},
{
"id": 24,
"api": "/api/users/getguildlist",
"name": "获取军团列表",
"module": "user",
"type": "find"
},
{
"id": 25,
"api": "/api/users/getmembersbyguildcode",
"name": "获取军团成员列表",
"module": "user",
"type": "find"
},
{
"id": 26,
"api": "/api/users/deleteequip",
"name": "删除装备",
"module": "user",
"type": "delete"
},
{
"id": 27,
"api": "/api/users/deleteitem",
"name": "删除道具",
"module": "user",
"type": "delete"
},
{
"id": 28,
"api": "/api/users/createandgenerategift",
"name": "创建并生成礼包码",
"module": "giftcode",
"type": "add"
},
{
"id": 29,
"api": "/api/users/updategiftcode",
"name": "更新礼包码",
"module": "giftcode",
"type": "update"
},
{
"id": 30,
"api": "/api/users/generategiftcode",
"name": "追加礼包码",
"module": "giftcode",
"type": "update"
},
{
"id": 31,
"api": "/api/users/cancelgiftCode",
"name": "取消礼包码",
"module": "giftcode",
"type": "delete"
},
{
"id": 32,
"api": "/api/users/getgiftcodedetaillist",
"name": "获取礼包码列表",
"module": "giftcode",
"type": "find"
},
{
"id": 33,
"api": "/api/game/getregions",
"name": "获取所有大区",
"module": "server",
"type": "find"
},
{
"id": 34,
"api": "/api/game/getservers",
"name": "获取所有小区",
"module": "server",
"type": "find"
},
{
"id": 35,
"api": "/api/game/getregionstategy",
"name": "获取大区策略",
"module": "server",
"type": "find"
},
{
"id": 36,
"api": "/api/game/getwhitelist",
"name": "获取白名单",
"module": "server",
"type": "find"
},
{
"id": 37,
"api": "/api/game/updatewhitelist",
"name": "更新白名单",
"module": "server",
"type": "update"
},
{
"id": 38,
"api": "/api/game/deletewhitelist",
"name": "删除白名单",
"module": "server",
"type": "delete"
},
{
"id": 39,
"api": "/api/game/stopserverregister",
"name": "小区停止注册",
"module": "server",
"type": "update"
},
{
"id": 40,
"api": "/api/game/swicthserverstatus",
"name": "切换服务器状态",
"module": "server",
"type": "update"
},
{
"id": 41,
"api": "/api/dic/getdicgoods", "api": "/api/dic/getdicgoods",
"name": "获取物品字典表", "name": "获取物品字典表",
"module": "base", "module": "base",
"type": "find" "type": "find"
}, },
{ {
"id": 42, "id": 5,
"api": "/api/dic/getdichero", "api": "/api/dic/getdichero",
"name": "获取武将字典表", "name": "获取武将字典表",
"module": "base", "module": "base",
"type": "find" "type": "find"
}, },
{ {
"id": 43, "id": 6,
"api": "/api/dic/getdicrmb", "api": "/api/dic/getdicrmb",
"name": "获取商品字典表", "name": "获取商品字典表",
"module": "base", "module": "base",
"type": "find" "type": "find"
}, },
{ {
"id": 44, "id": 7,
"api": "/api/dic/getdicactivitytype", "api": "/api/dic/getdicactivitytype",
"name": "获取活动类型字典表", "name": "获取活动类型字典表",
"module": "base", "module": "base",
"type": "find" "type": "find"
}, },
{ {
"id": 45, "id": 8,
"api": "/api/dic/getdictasktype", "api": "/api/dic/getdictasktype",
"name": "获取任务类型字典表", "name": "获取任务类型字典表",
"module": "base", "module": "base",
"type": "find" "type": "find"
}, },
{ {
"id": 46, "id": 9,
"api": "/api/dic/getservername", "api": "/api/dic/getservername",
"name": "获取服务器名称字典表", "name": "获取服务器名称字典表",
"module": "base", "module": "base",
"type": "find" "type": "find"
}, },
{ {
"id": 47, "id": 10,
"api": "/api/gmaccount/getgmlist",
"name": "获取gm账号列表",
"module": "gmaccount",
"type": "find"
},
{
"id": 11,
"api": "/api/gmaccount/createaccount",
"name": "创建gm账号",
"module": "gmaccount",
"type": "add"
},
{
"id": 12,
"api": "/api/gmaccount/savegmgrouptouser",
"name": "将账号组保存至账号",
"module": "gmaccount",
"type": "update"
},
{
"id": 13,
"api": "/api/gmaccount/getgrouplist",
"name": "获取账号组列表",
"module": "gmaccount",
"type": "find"
},
{
"id": 14,
"api": "/api/gmaccount/getapilist",
"name": "获取api列表",
"module": "gmaccount",
"type": "find"
},
{
"id": 15,
"api": "/api/gmaccount/creategmgroup",
"name": "创建账号组",
"module": "gmaccount",
"type": "add"
},
{
"id": 16,
"api": "/api/gmaccount/savegmgroup",
"name": "保存账号组",
"module": "gmaccount",
"type": "update"
},
{
"id": 17,
"api": "/api/gmaccount/saveapitogroup",
"name": "将api保存至账号组",
"module": "gmaccount",
"type": "update"
},
{
"id": 18,
"api": "/api/users/getuserlist",
"name": "获取玩家账号列表",
"module": "user",
"type": "find"
},
{
"id": 19,
"api": "/api/users/fixsms",
"name": "固定玩家短信",
"module": "user",
"type": "update"
},
{
"id": 20,
"api": "/api/users/getrolelist",
"name": "获取玩家角色列表",
"module": "user",
"type": "find"
},
{
"id": 21,
"api": "/api/users/deleterole",
"name": "删除角色",
"module": "user",
"type": "delete"
},
{
"id": 22,
"api": "/api/users/setwar",
"name": "设置关卡",
"module": "user",
"type": "update"
},
{
"id": 23,
"api": "/api/users/getherolist",
"name": "获取玩家武将列表",
"module": "user",
"type": "find"
},
{
"id": 24,
"api": "/api/users/deletehero",
"name": "删除武将",
"module": "user",
"type": "delete"
},
{
"id": 25,
"api": "/api/users/getequiplist",
"name": "获取玩家装备列表",
"module": "user",
"type": "find"
},
{
"id": 26,
"api": "/api/users/getitemlist",
"name": "获取玩家道具列表",
"module": "user",
"type": "find"
},
{
"id": 27,
"api": "/api/users/deleteequip",
"name": "删除装备",
"module": "user",
"type": "delete"
},
{
"id": 28,
"api": "/api/users/deleteitem",
"name": "删除道具",
"module": "user",
"type": "delete"
},
{
"id": 29,
"api": "gm.gmRoleHandler.addItems",
"name": "增加道具",
"module": "user",
"type": "update"
},
{
"id": 30,
"api": "gm.gmRoleHandler.handleBlock",
"name": "封禁",
"module": "user",
"type": "update"
},
{
"id": 31,
"api": "/api/users/getguildlist",
"name": "获取军团列表",
"module": "guild",
"type": "find"
},
{
"id": 32,
"api": "/api/users/getmembersbyguildcode",
"name": "获取军团成员列表",
"module": "guild",
"type": "find"
},
{
"id": 33,
"api": "gm.gmRoleHandler.updateGuild",
"name": "更新军团",
"module": "guild",
"type": "update"
},
{
"id": 34,
"api": "gm.gmRoleHandler.dismissGuild",
"name": "解散军团",
"module": "guild",
"type": "update"
},
{
"id": 35,
"api": "gm.gmRoleHandler.setGuildLeader",
"name": "设置军团长",
"module": "guild",
"type": "update"
},
{
"id": 36,
"api": "/api/users/createandgenerategift",
"name": "创建并生成礼包码",
"module": "giftcode",
"type": "add"
},
{
"id": 37,
"api": "/api/users/updategiftcode",
"name": "更新礼包码",
"module": "giftcode",
"type": "update"
},
{
"id": 38,
"api": "/api/users/generategiftcode",
"name": "追加礼包码",
"module": "giftcode",
"type": "update"
},
{
"id": 39,
"api": "/api/users/cancelgiftCode",
"name": "取消礼包码",
"module": "giftcode",
"type": "delete"
},
{
"id": 40,
"api": "/api/users/getgiftcodedetaillist",
"name": "获取礼包码列表",
"module": "giftcode",
"type": "find"
},
{
"id": 41,
"api": "/api/users/getgiftcodelist",
"name": "获取礼包码列表",
"module": "giftcode",
"type": "find"
},
{
"id": 42,
"api": "/api/game/getnoticelist", "api": "/api/game/getnoticelist",
"name": "获取公告列表", "name": "获取公告列表",
"module": "notice", "module": "notice",
"type": "find" "type": "find"
}, },
{ {
"id": 48, "id": 43,
"api": "/api/game/updatenotice", "api": "/api/game/updatenotice",
"name": "更新公告", "name": "更新公告",
"module": "notice", "module": "notice",
"type": "update" "type": "update"
}, },
{ {
"id": 49, "id": 44,
"api": "/api/game/delnotice", "api": "/api/game/delnotice",
"name": "删除公告", "name": "删除公告",
"module": "notice", "module": "notice",
"type": "delete" "type": "delete"
}, },
{ {
"id": 50, "id": 45,
"api": "/api/game/getmarqueelist", "api": "/api/game/getmarqueelist",
"name": "获取跑马灯列表", "name": "获取跑马灯列表",
"module": "marquee", "module": "marquee",
"type": "find" "type": "find"
}, },
{ {
"id": 51, "id": 46,
"api": "/api/game/updatemarquee", "api": "/api/game/updatemarquee",
"name": "更新跑马灯", "name": "更新跑马灯",
"module": "marquee", "module": "marquee",
"type": "update" "type": "update"
}, },
{ {
"id": 52, "id": 47,
"api": "gm.gmServerHandler.sendMarquee",
"name": "发送跑马灯",
"module": "marquee",
"type": "update"
},
{
"id": 48,
"api": "gm.gmServerHandler.cancelMarquee",
"name": "取消跑马灯",
"module": "marquee",
"type": "update"
},
{
"id": 49,
"api": "/api/game/getaccuse", "api": "/api/game/getaccuse",
"name": "获取举报列表", "name": "获取举报列表",
"module": "accuse", "module": "accuse",
"type": "find" "type": "find"
}, },
{ {
"id": 53, "id": 50,
"api": "/api/activity/getactivitylist", "api": "/api/activity/getactivitylist",
"name": "获取活动列表", "name": "获取活动列表",
"module": "activity", "module": "activity",
"type": "find" "type": "find"
}, },
{ {
"id": 54, "id": 51,
"api": "/api/activity/getallactivities", "api": "/api/activity/getallactivities",
"name": "获取所有活动", "name": "获取所有活动",
"module": "base", "module": "activity",
"type": "find" "type": "find"
}, },
{ {
"id": 55, "id": 52,
"api": "/api/activity/getactivitygrouplist", "api": "/api/activity/getactivitygrouplist",
"name": "获取活动组列表", "name": "获取活动组列表",
"module": "activity", "module": "activity",
"type": "find" "type": "find"
}, },
{ {
"id": 56, "id": 53,
"api": "/api/activity/getallactivitygroups", "api": "/api/activity/getallactivitygroups",
"name": "获取所有活动组", "name": "获取所有活动组",
"module": "base", "module": "activity",
"type": "find" "type": "find"
}, },
{ {
"id": 57, "id": 54,
"api": "/api/activity/creategroup", "api": "/api/activity/creategroup",
"name": "创建活动组", "name": "创建活动组",
"module": "activity", "module": "activity",
"type": "add" "type": "add"
}, },
{ {
"id": 58, "id": 55,
"api": "/api/activity/deletegroup", "api": "/api/activity/deletegroup",
"name": "删除活动组", "name": "删除活动组",
"module": "activity", "module": "activity",
"type": "delete" "type": "delete"
}, },
{ {
"id": 59, "id": 56,
"api": "/api/activity/getactivitygrouptypelist", "api": "/api/activity/getactivitygrouptypelist",
"name": "获取活动组类型列表", "name": "获取活动组类型列表",
"module": "activity", "module": "activity",
"type": "find" "type": "find"
}, },
{ {
"id": 60, "id": 57,
"api": "/api/activity/getallactivitygrouptypes", "api": "/api/activity/getallactivitygrouptypes",
"name": "获取所有活动组类型", "name": "获取所有活动组类型",
"module": "base", "module": "activity",
"type": "find" "type": "find"
}, },
{ {
"id": 61, "id": 58,
"api": "/api/activity/saveactivitygrouptypelist", "api": "/api/activity/saveactivitygrouptypelist",
"name": "保存活动组类型", "name": "保存活动组类型",
"module": "activity", "module": "activity",
"type": "update" "type": "update"
}, },
{ {
"id": 62, "id": 59,
"api": "/api/activity/deleteactivitygrouptype", "api": "/api/activity/deleteactivitygrouptype",
"name": "删除活动组类型", "name": "删除活动组类型",
"module": "activity", "module": "activity",
"type": "delete" "type": "delete"
}, },
{ {
"id": 63, "id": 60,
"api": "/api/activity/getactivitytaskpoint", "api": "/api/activity/getactivitytaskpoint",
"name": "获取活动和任务对应", "name": "获取活动和任务对应",
"module": "activity", "module": "activity",
"type": "find" "type": "find"
}, },
{ {
"id": 64, "id": 61,
"api": "/api/activity/createtasktoactivity", "api": "/api/activity/createtasktoactivity",
"name": "创建活动和任务对应点", "name": "创建活动和任务对应点",
"module": "activity", "module": "activity",
"type": "add" "type": "add"
}, },
{ {
"id": 65, "id": 62,
"api": "/api/activity/updateactivitytaskpoint", "api": "/api/activity/updateactivitytaskpoint",
"name": "更新活动和任务对应点", "name": "更新活动和任务对应点",
"module": "activity", "module": "activity",
"type": "update" "type": "update"
}, },
{ {
"id": 66, "id": 63,
"api": "/api/activity/delactivitytaskpoint", "api": "/api/activity/delactivitytaskpoint",
"name": "删除活动和任务对应点", "name": "删除活动和任务对应点",
"module": "activity", "module": "activity",
"type": "delete" "type": "delete"
}, },
{
"id": 64,
"api": "gm.gmHandler.updateActivity",
"name": "更新活动",
"module": "activity",
"type": "update"
},
{
"id": 65,
"api": "gm.gmHandler.deleteActivity",
"name": "删除活动",
"module": "activity",
"type": "delete"
},
{
"id": 66,
"api": "gm.gmHandler.updateActivityGroup",
"name": "更新活动组",
"module": "activity",
"type": "update"
},
{ {
"id": 67, "id": 67,
"api": "/api/mail/getcreatesinglemail", "api": "/api/mail/getcreatesinglemail",
@@ -521,7 +521,7 @@
"id": 75, "id": 75,
"api": "/api/mail/findrolebyidorname", "api": "/api/mail/findrolebyidorname",
"name": "根据玩家名获取玩家", "name": "根据玩家名获取玩家",
"module": "base", "module": "mail",
"type": "find" "type": "find"
}, },
{ {
@@ -561,142 +561,142 @@
}, },
{ {
"id": 81, "id": 81,
"api": "gm.gmHandler.reloadResource",
"name": "加载资源",
"module": "upload",
"type": "update"
},
{
"id": 82,
"api": "gm.gmHandler.updateActivity",
"name": "更新活动",
"module": "activity",
"type": "update"
},
{
"id": 83,
"api": "gm.gmHandler.deleteActivity",
"name": "删除活动",
"module": "activity",
"type": "delete"
},
{
"id": 84,
"api": "gm.gmHandler.updateActivityGroup",
"name": "更新活动组",
"module": "activity",
"type": "update"
},
{
"id": 85,
"api": "gm.gmHandler.setGuildActivityDebug", "api": "gm.gmHandler.setGuildActivityDebug",
"name": "开启军团活动", "name": "开启军团活动",
"module": "guildactivity", "module": "guildactivity",
"type": "update" "type": "update"
}, },
{ {
"id": 86, "id": 82,
"api": "gm.gmHandler.cancelGuildActivityDebug", "api": "gm.gmHandler.cancelGuildActivityDebug",
"name": "取消军团活动", "name": "取消军团活动",
"module": "guildactivity", "module": "guildactivity",
"type": "update" "type": "update"
}, },
{
"id": 83,
"api": "/api/game/getregions",
"name": "获取所有大区",
"module": "server",
"type": "find"
},
{
"id": 84,
"api": "/api/game/getservers",
"name": "获取所有小区",
"module": "server",
"type": "find"
},
{
"id": 85,
"api": "/api/game/getregionstategy",
"name": "获取大区策略",
"module": "server",
"type": "find"
},
{
"id": 86,
"api": "/api/game/getwhitelist",
"name": "获取白名单",
"module": "server",
"type": "find"
},
{ {
"id": 87, "id": 87,
"api": "gm.gmRoleHandler.addItems", "api": "/api/game/updatewhitelist",
"name": "增加道具", "name": "更新白名单",
"module": "user", "module": "server",
"type": "update" "type": "update"
}, },
{ {
"id": 88, "id": 88,
"api": "gm.gmRoleHandler.handleBlock", "api": "/api/game/deletewhitelist",
"name": "封禁", "name": "删除白名单",
"module": "user", "module": "server",
"type": "update" "type": "delete"
}, },
{ {
"id": 89, "id": 89,
"api": "gm.gmRoleHandler.updateGuild", "api": "/api/game/stopserverregister",
"name": "更新军团", "name": "小区停止注册",
"module": "guild", "module": "server",
"type": "update" "type": "update"
}, },
{ {
"id": 90, "id": 90,
"api": "gm.gmRoleHandler.dismissGuild", "api": "/api/game/swicthserverstatus",
"name": "解散军团", "name": "切换服务器状态",
"module": "guild", "module": "server",
"type": "update" "type": "update"
}, },
{ {
"id": 91, "id": 91,
"api": "gm.gmRoleHandler.setGuildLeader",
"name": "设置军团长",
"module": "guild",
"type": "update"
},
{
"id": 92,
"api": "gm.gmServerHandler.saveRegionConf", "api": "gm.gmServerHandler.saveRegionConf",
"name": "保存大区设置", "name": "保存大区设置",
"module": "server", "module": "server",
"type": "update" "type": "update"
}, },
{ {
"id": 93, "id": 92,
"api": "gm.gmServerHandler.createNewServer", "api": "gm.gmServerHandler.createNewServer",
"name": "手动开服", "name": "手动开服",
"module": "server", "module": "server",
"type": "update" "type": "update"
}, },
{ {
"id": 94, "id": 93,
"api": "gm.gmServerHandler.startMaintenance", "api": "gm.gmServerHandler.startMaintenance",
"name": "开始维护", "name": "开始维护",
"module": "server", "module": "server",
"type": "update" "type": "update"
}, },
{ {
"id": 95, "id": 94,
"api": "gm.gmServerHandler.startRegionMaintenance", "api": "gm.gmServerHandler.startRegionMaintenance",
"name": "开始大区维护", "name": "开始大区维护",
"module": "server", "module": "server",
"type": "update" "type": "update"
}, },
{ {
"id": 96, "id": 95,
"api": "gm.gmServerHandler.stopMaintenance", "api": "gm.gmServerHandler.stopMaintenance",
"name": "停止维护", "name": "停止维护",
"module": "server", "module": "server",
"type": "update" "type": "update"
}, },
{
"id": 96,
"api": "/api/upload/hotupdate",
"name": "上传热更新",
"module": "upload",
"type": "update"
},
{ {
"id": 97, "id": 97,
"api": "gm.gmServerHandler.sendMarquee", "api": "/api/upload/uploadjson",
"name": "发送跑马灯", "name": "上传json",
"module": "marquee", "module": "upload",
"type": "update" "type": "update"
}, },
{ {
"id": 98, "id": 98,
"api": "gm.gmServerHandler.cancelMarquee", "api": "/web/reloadresource",
"name": "取消跑马灯", "name": "加载资源(web)",
"module": "marquee", "module": "upload",
"type": "update" "type": "update"
}, },
{ {
"id": 99, "id": 99,
"api": "/web/reloadresource", "api": "/api/upload/reloadresource",
"name": "加载资源", "name": "加载资源(后台)",
"module": "upload", "module": "upload",
"type": "update" "type": "update"
}, },
{ {
"id": 100, "id": 100,
"api": "/api/users/getgiftcodelist", "api": "gm.gmHandler.reloadResource",
"name": "获取礼包码列表", "name": "加载资源(游戏)",
"module": "giftcode", "module": "upload",
"type": "find" "type": "update"
} }
] ]

View File

@@ -45,7 +45,7 @@ module.exports = () => {
ctx.user = user; ctx.user = user;
await next(); await next();
if(dicApi.type != GM_API_TYPE.find) { if(dicApi.type != GM_API_TYPE.find) {
GMRecordModel.createRecord(user?user.uid:0, ctx.request.url, JSON.stringify(ctx.request.body||{}), JSON.stringify(ctx.body||{})); GMRecordModel.createRecord(user?user.uid:0, ctx.app.config.realEnv, ctx.request.url, JSON.stringify(ctx.request.body||{}), JSON.stringify(ctx.body||{}));
} }
}; };
}; };