Skip to content

Commit

Permalink
feat(alert-sdk) : AlarmRuleService Add SetIsEnabledAsync (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 authored Apr 11, 2023
1 parent d8ea166 commit 435de40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ public interface IAlarmRuleService
Task DeleteAsync(Guid id);

Task<AlarmRuleModel?> GetAsync(Guid id);

Task SetIsEnabledAsync(Guid id, bool isEnabled);
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ public async Task DeleteAsync(Guid id)
var requestUri = $"{_party}/{id}";
return await _caller.GetAsync<AlarmRuleModel>(requestUri);
}

public async Task SetIsEnabledAsync(Guid id, bool isEnabled)
{
var requestUri = $"{_party}/{id}/enabled/{isEnabled}";
await _caller.PutAsync(requestUri, null);
}
}

0 comments on commit 435de40

Please sign in to comment.