mirror of
https://github.com/bitwarden/server.git
synced 2025-05-28 23:04:50 -05:00
fix double //
This commit is contained in:
parent
a275af6366
commit
255855887b
@ -92,7 +92,7 @@ namespace Bit.Core.Services
|
|||||||
var requestMessage = new HttpRequestMessage
|
var requestMessage = new HttpRequestMessage
|
||||||
{
|
{
|
||||||
Method = HttpMethod.Post,
|
Method = HttpMethod.Post,
|
||||||
RequestUri = new Uri(string.Concat(IdentityClient.BaseAddress, "/connect/token")),
|
RequestUri = new Uri(string.Concat(IdentityClient.BaseAddress, "connect/token")),
|
||||||
Content = new FormUrlEncodedContent(new Dictionary<string, string>
|
Content = new FormUrlEncodedContent(new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
{ "grant_type", "client_credentials" },
|
{ "grant_type", "client_credentials" },
|
||||||
|
@ -141,7 +141,7 @@ namespace Bit.Core.Services
|
|||||||
{
|
{
|
||||||
var contextId = GetContextIdentifier(excludeCurrentContext);
|
var contextId = GetContextIdentifier(excludeCurrentContext);
|
||||||
var request = new PushNotificationData<T>(type, payload, contextId);
|
var request = new PushNotificationData<T>(type, payload, contextId);
|
||||||
await SendAsync(HttpMethod.Post, "/notification", request);
|
await SendAsync(HttpMethod.Post, "notification", request);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetContextIdentifier(bool excludeCurrentContext)
|
private string GetContextIdentifier(bool excludeCurrentContext)
|
||||||
|
@ -144,7 +144,7 @@ namespace Bit.Core.Services
|
|||||||
ExcludeCurrentContext(request);
|
ExcludeCurrentContext(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
await SendAsync(HttpMethod.Post, "/push/send", request);
|
await SendAsync(HttpMethod.Post, "push/send", request);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task SendPayloadToOrganizationAsync(Guid orgId, PushType type, object payload, bool excludeCurrentContext)
|
private async Task SendPayloadToOrganizationAsync(Guid orgId, PushType type, object payload, bool excludeCurrentContext)
|
||||||
@ -161,7 +161,7 @@ namespace Bit.Core.Services
|
|||||||
ExcludeCurrentContext(request);
|
ExcludeCurrentContext(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
await SendAsync(HttpMethod.Post, "/push/send", request);
|
await SendAsync(HttpMethod.Post, "push/send", request);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExcludeCurrentContext(PushSendRequestModel request)
|
private void ExcludeCurrentContext(PushSendRequestModel request)
|
||||||
|
@ -37,12 +37,12 @@ namespace Bit.Core.Services
|
|||||||
Type = type,
|
Type = type,
|
||||||
UserId = userId
|
UserId = userId
|
||||||
};
|
};
|
||||||
await SendAsync(HttpMethod.Post, "/push/register", requestModel);
|
await SendAsync(HttpMethod.Post, "push/register", requestModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task DeleteRegistrationAsync(string deviceId)
|
public async Task DeleteRegistrationAsync(string deviceId)
|
||||||
{
|
{
|
||||||
await SendAsync(HttpMethod.Delete, string.Concat("/push/", deviceId));
|
await SendAsync(HttpMethod.Delete, string.Concat("push/", deviceId));
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task AddUserRegistrationOrganizationAsync(IEnumerable<string> deviceIds, string organizationId)
|
public async Task AddUserRegistrationOrganizationAsync(IEnumerable<string> deviceIds, string organizationId)
|
||||||
@ -53,7 +53,7 @@ namespace Bit.Core.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
var requestModel = new PushUpdateRequestModel(deviceIds, organizationId);
|
var requestModel = new PushUpdateRequestModel(deviceIds, organizationId);
|
||||||
await SendAsync(HttpMethod.Put, "/push/add-organization", requestModel);
|
await SendAsync(HttpMethod.Put, "push/add-organization", requestModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task DeleteUserRegistrationOrganizationAsync(IEnumerable<string> deviceIds, string organizationId)
|
public async Task DeleteUserRegistrationOrganizationAsync(IEnumerable<string> deviceIds, string organizationId)
|
||||||
@ -64,7 +64,7 @@ namespace Bit.Core.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
var requestModel = new PushUpdateRequestModel(deviceIds, organizationId);
|
var requestModel = new PushUpdateRequestModel(deviceIds, organizationId);
|
||||||
await SendAsync(HttpMethod.Put, "/push/delete-organization", requestModel);
|
await SendAsync(HttpMethod.Put, "push/delete-organization", requestModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user