mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-06-19 18:28:17 +08:00
feat: ✨ 日志管理独立出来、增加登录日志界面 (#65)
This commit is contained in:
@ -144,7 +144,7 @@ public sealed class DevService(IApiService apiService) : ServiceBase<DevService>
|
||||
iconSelectContent = _regex2.Replace(iconSelectContent, "\"$1\":");
|
||||
iconSelectContent = "{" + iconSelectContent + "}";
|
||||
var iconExportJsInfo = iconSelectContent.ToObject<IconExportJsInfo>();
|
||||
iconExportJsInfo.ExportDefault.Icons.Last().Icons.Add($"sc-icon-{req.IconName.ToLowerInvariant()}");
|
||||
iconExportJsInfo.ExportDefault.Icons.Last().Icons.Add($"sc-icon-{req.IconName}");
|
||||
var newContent = iconExportJsInfo.ToJson().TrimStart('{')[..^1].Replace("\"exportDefault\":", "export default");
|
||||
|
||||
await File.WriteAllTextAsync(iconSelectFile, newContent).ConfigureAwait(false);
|
||||
|
@ -28,7 +28,7 @@ public sealed class OperationLogger : IEventSubscriber
|
||||
CreateRequestLogReq logReq = null;
|
||||
|
||||
// 登录日志特殊处理
|
||||
if (operationEvent.Data.ApiId.Equals("api/user/login", StringComparison.OrdinalIgnoreCase)) {
|
||||
if (operationEvent.Data.ApiId.Equals("api/sys/user/login.by.pwd", StringComparison.OrdinalIgnoreCase)) {
|
||||
try {
|
||||
var loginReq = operationEvent.Data.RequestBody.ToObject<LoginByPwdReq>();
|
||||
logReq = operationEvent.Data with { ExtraData = loginReq.Account };
|
||||
|
Reference in New Issue
Block a user