public APIResult SetAppIsDisabled([FromBody] SetAppIsDisabledArgsModel args) { var username = GetUsername(); var communityFlag = args.CommunityFlag; if (string.IsNullOrEmpty(communityFlag)) { throw new ArgumentNullException("communityFlag"); } if (string.IsNullOrEmpty(args.AppFlag)) { throw new ArgumentNullException("AppFlag"); } _communityService.SetAppIsDisabled(communityFlag, args.AppFlag, args.IsDisabled); return(Success()); }
public APIResult SetAppIsDisabled([FromBody] SetAppIsDisabledArgsModel args) { try { var username = GetUsername(); if (string.IsNullOrEmpty(args.CurrentCommunityFlag)) { throw new ArgumentNullException("CurrentCommunityFlag"); } if (string.IsNullOrEmpty(args.CurrentAppFlag)) { throw new ArgumentNullException("CurrentAppFlag"); } _communityService.SetAppIsDisabled(args.CurrentCommunityFlag, args.CurrentAppFlag, args.IsDisabled); return(Success()); } catch (Exception ex) { _logger.LogError(0, ex, "SetAppIsDisabled有错误发生"); return(Error(ex.Message)); } }