mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-02 08:40:08 +01:00
collect many events
This commit is contained in:
parent
74c3019858
commit
e15e0eebbd
@ -256,7 +256,7 @@ export abstract class ApiService {
|
||||
token: string) => Promise<ListResponse<EventResponse>>;
|
||||
getEventsOrganizationUser: (organizationId: string, id: string,
|
||||
start: string, end: string, token: string) => Promise<ListResponse<EventResponse>>;
|
||||
postEventsCollect: (request: EventRequest) => Promise<any>;
|
||||
postEventsCollectMany: (request: EventRequest[]) => Promise<any>;
|
||||
|
||||
getUserPublicKey: (id: string) => Promise<UserKeyResponse>;
|
||||
|
||||
|
@ -841,14 +841,14 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return new ListResponse(r, EventResponse);
|
||||
}
|
||||
|
||||
async postEventsCollect(request: EventRequest): Promise<any> {
|
||||
async postEventsCollectMany(request: EventRequest[]): Promise<any> {
|
||||
const authHeader = await this.getActiveBearerToken();
|
||||
const headers = new Headers({
|
||||
'Device-Type': this.deviceType,
|
||||
'Authorization': 'Bearer ' + authHeader,
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
});
|
||||
const response = await this.fetch(new Request(this.eventsBaseUrl + '/collect', {
|
||||
const response = await this.fetch(new Request(this.eventsBaseUrl + '/collect/many', {
|
||||
cache: 'no-cache',
|
||||
credentials: this.getCredentials(),
|
||||
method: 'POST',
|
||||
|
Loading…
Reference in New Issue
Block a user