1
0
mirror of https://github.com/bitwarden/server synced 2026-01-03 17:14:00 +00:00

[SG-419] Fix problems with push notifications on self-host (#2338)

* Added "internal" to non-user-based request types to avoid failing validation.

* Added handling of unsuccessful response so that JSON parsing eror doesn't occur.

* Added logging for token errors.

(cherry picked from commit dad143b3e42247bc6b397b60803e25d243bd83a5)

* Fixed bug in next auth attempt handling.

* Fixed linting.

* Added deserialization options to handle case insensitivity.

* Added a new method for SendAsync that does not expect a result from the client.

* hasJsonResult param to make Send more reusable

* some cleanup

* fix lint problems

* Added launch config for Notifications.

* Added Notifications to Full Server config.

Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
This commit is contained in:
Todd Martin
2022-11-01 09:58:28 -04:00
committed by GitHub
parent 14074e1e33
commit e277b9e84e
6 changed files with 109 additions and 23 deletions

View File

@@ -72,12 +72,13 @@ public class SelfHostedSyncSponsorshipsCommand : BaseIdentityClientService, ISel
foreach (var orgSponsorshipsBatch in organizationSponsorshipsDict.Values.Chunk(1000))
{
var response = await SendAsync<OrganizationSponsorshipSyncRequestModel, OrganizationSponsorshipSyncResponseModel>(HttpMethod.Post, "organization/sponsorship/sync", new OrganizationSponsorshipSyncRequestModel
{
BillingSyncKey = billingSyncConfig.BillingSyncKey,
SponsoringOrganizationCloudId = cloudOrganizationId,
SponsorshipsBatch = orgSponsorshipsBatch.Select(s => new OrganizationSponsorshipRequestModel(s))
});
var response = await SendAsync<OrganizationSponsorshipSyncRequestModel, OrganizationSponsorshipSyncResponseModel>(
HttpMethod.Post, "organization/sponsorship/sync", new OrganizationSponsorshipSyncRequestModel
{
BillingSyncKey = billingSyncConfig.BillingSyncKey,
SponsoringOrganizationCloudId = cloudOrganizationId,
SponsorshipsBatch = orgSponsorshipsBatch.Select(s => new OrganizationSponsorshipRequestModel(s))
}, true);
if (response == null)
{