Example #1
0
        /// <summary>
        /// 更改客户端的启用状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="enabled"></param>
        /// <returns></returns>
        public async Task <NarutoResult> UpdateEnabled(string id, bool enabled)
        {
            if (string.IsNullOrWhiteSpace(id))
            {
                return(new NarutoFailResult($"{nameof(id)}值不能为空"));
            }
            //访问存储接口
            var res = await clientStorage.UpdateEnabled(id, enabled);

            if (res)
            {
                return(new NarutoSuccessResult("操作成功"));
            }
            return(new NarutoFailResult("操作失败"));
        }