diff --git a/CHANGELOG.md b/CHANGELOG.md index 0987e4ee..a2a747dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- **Deleting an alarm no longer DMs a filter dump for every row removed.** PoracleNG confirms a delete over Discord unless the request says `?silent=true` -- creates have always asked for silence, but nothing on the delete path ever did, so a single delete, a bulk select-and-delete, a cleaning-service reset or an admin "delete all alarms" all sent one line per alarm listing its full distance/IV/CP/level/size filters, sometimes dozens of lines in one DM. Both delete calls now ask for silence the same way create already does ([#848](https://github.com/PGAN-Dev/PoracleWeb.NET/issues/848)). - **Every map on the site was rendering with an "API KEY REQUIRED" watermark across the tiles.** CARTO now requires a key on its basemaps and watermarks requests that arrive without one -- but it still answers success and still returns usable tiles, so nothing logged, no health check noticed, and the only place it showed was on screen. The tile URL was written out in five separate components, three of which had also drifted into carrying no attribution at all, so there was nowhere to put a key without a rebuild. All five now draw their tiles from one place, and admin settings grows a *Maps* section with the key, the tile URL and the attribution line. Set the key there and the watermark goes. Leaving it blank keeps exactly the maps you have today, and an operator pointing the URL at a provider that wants no key is not nagged about one ([#842](https://github.com/PGAN-Dev/PoracleWeb.NET/issues/842)). - **The *Until* fields in the schedule editor say what they are.** Turning on a repeat adds an end time, and both its labels rendered cut off -- *Until (hou*, *Until (mir* -- because the field has to stay narrow enough for an hour and a minute to sit side by side on a phone. The qualifier has moved out of the fields and onto the pair it describes, so the row now reads *Starts at* over one hour-and-minute pair and *Until* over the other, and each field is labelled by the short word it asks for. Screen readers still hear the full wording. This is the editor quest summary schedules use as well. - **The sixth quest reward type fits.** PokéCoins arrived as a sixth tab in a strip that had already been trimmed twice to hold five, and at dialog width its label was clipped to *Pok* -- selected or not -- with the strip offering a pagination arrow rather than scrolling it into view. The words are longer still in most of the other ten languages, so the next trim would have clipped Stardust as well. The reward is now chosen from a single *Reward type* list, which fits at any width in any language and matches how the Pokemon dialog handles its own crowded first tab. Nothing about the alarms changes: the same six rewards, in the same order, saving the same rules. diff --git a/Core/Pgan.PoracleWebNet.Core.Services/PoracleTrackingProxy.cs b/Core/Pgan.PoracleWebNet.Core.Services/PoracleTrackingProxy.cs index 1fee3ccb..060b6bb2 100644 --- a/Core/Pgan.PoracleWebNet.Core.Services/PoracleTrackingProxy.cs +++ b/Core/Pgan.PoracleWebNet.Core.Services/PoracleTrackingProxy.cs @@ -165,7 +165,7 @@ public async Task UpdateByUidAsync( public async Task DeleteByUidAsync(string type, string userId, int uid) { - var request = this.CreateRequest(HttpMethod.Delete, $"{this._apiAddress}/api/tracking/{type}/{Encode(userId)}/byUid/{uid}"); + var request = this.CreateRequest(HttpMethod.Delete, $"{this._apiAddress}/api/tracking/{type}/{Encode(userId)}/byUid/{uid}?silent=true"); var response = await this._httpClient.SendAsync(request); if (response.StatusCode == HttpStatusCode.NotFound) @@ -186,7 +186,7 @@ public async Task BulkDeleteByUidsAsync(string type, string userId, IEnumerable< return; } - var request = this.CreateRequest(HttpMethod.Post, $"{this._apiAddress}/api/tracking/{type}/{Encode(userId)}/delete"); + var request = this.CreateRequest(HttpMethod.Post, $"{this._apiAddress}/api/tracking/{type}/{Encode(userId)}/delete?silent=true"); request.Content = new StringContent( JsonSerializer.Serialize(uidList.Select(u => (long)u)), Encoding.UTF8, diff --git a/Tests/Pgan.PoracleWebNet.Tests/Services/PoracleTrackingProxyTests.cs b/Tests/Pgan.PoracleWebNet.Tests/Services/PoracleTrackingProxyTests.cs index 5212c00b..e8b90a2d 100644 --- a/Tests/Pgan.PoracleWebNet.Tests/Services/PoracleTrackingProxyTests.cs +++ b/Tests/Pgan.PoracleWebNet.Tests/Services/PoracleTrackingProxyTests.cs @@ -285,7 +285,7 @@ public async Task DeleteByUidAsyncCallsCorrectUrl() Assert.NotNull(handler.LastRequest); Assert.Equal(HttpMethod.Delete, handler.LastRequest.Method); - Assert.Equal($"{ApiAddress}/api/tracking/raid/user1/byUid/42", handler.LastRequest.RequestUri?.ToString()); + Assert.Equal($"{ApiAddress}/api/tracking/raid/user1/byUid/42?silent=true", handler.LastRequest.RequestUri?.ToString()); } [Fact] @@ -321,7 +321,7 @@ public async Task BulkDeleteByUidsAsyncSendsUidArray() Assert.NotNull(handler.LastRequest); Assert.Equal(HttpMethod.Post, handler.LastRequest.Method); - Assert.Equal($"{ApiAddress}/api/tracking/pokemon/user1/delete", handler.LastRequest.RequestUri?.ToString()); + Assert.Equal($"{ApiAddress}/api/tracking/pokemon/user1/delete?silent=true", handler.LastRequest.RequestUri?.ToString()); var sentBody = await handler.LastRequest.Content!.ReadAsStringAsync(); var uids = JsonSerializer.Deserialize>(sentBody);