diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 75e8a53..60b336e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,7 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v2 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Dependency cache uses: actions/cache@v3 diff --git a/src/Moderation.cs b/src/Moderation.cs index d9ead99..e035c1f 100644 --- a/src/Moderation.cs +++ b/src/Moderation.cs @@ -37,7 +37,7 @@ public async Task FlagReactionAsync(string entityId, string entity public async Task FlagAsync(string entityType, string entityId, string entityCreatorID, string reason, IDictionary options = null) { - var request = _client.BuildAppRequest("/moderation/flag", HttpMethod.Post); + var request = _client.BuildAppRequest("moderation/flag", HttpMethod.Post); request.SetJsonBody(StreamJsonConverter.SerializeObject(new { user_id = entityCreatorID, entity_type = entityType, entity_id = entityId, reason, diff --git a/tests/ModerationTests.cs b/tests/ModerationTests.cs index 82221f1..d5744de 100644 --- a/tests/ModerationTests.cs +++ b/tests/ModerationTests.cs @@ -12,7 +12,6 @@ namespace StreamNetTests public class ModerationTests : TestBase { [Test] - [Ignore("The api is not deployed yet")] public async Task TestModerationTemplate() { var newActivity2 = new Activity("1", "test", "2") @@ -22,7 +21,7 @@ public async Task TestModerationTemplate() }; newActivity2.SetData("moderation_template", "moderation_template_test_images"); - newActivity2.SetData("a", "pissoar"); + newActivity2.SetData("text", "pissoar"); var attachments = new Dictionary(); string[] images = new string[] { "image1", "image2" }; @@ -39,7 +38,6 @@ public async Task TestModerationTemplate() } [Test] - [Ignore("The api is not deployed yet")] public async Task TestReactionModeration() { var a = new Activity("user:1", "like", "cake") @@ -66,11 +64,9 @@ public async Task TestReactionModeration() Assert.AreEqual("complete", response.Status); Assert.AreEqual("remove", response.RecommendedAction); - Assert.ThrowsAsync(async () => await Client.Reactions.GetAsync(r.Id)); } [Test] - [Ignore("The api is not deployed yet")] public async Task TestFlagUser() { var userId = Guid.NewGuid().ToString(); @@ -91,7 +87,6 @@ public async Task TestFlagUser() } [Test] - [Ignore("The api is not deployed yet")] public async Task TestFlagActivity() { var newActivity = new Activity("vishal", "test", "1"); @@ -108,7 +103,6 @@ public async Task TestFlagActivity() } [Test] - [Ignore("The api is not deployed yet")] public async Task TestFlagReaction() { var a = new Activity("user:1", "like", "cake")