mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +00:00
[SM-288] Rename requests and responses to follow naming convention (#3806)
This commit is contained in:
13
libs/common/src/models/response/list.response.ts
Normal file
13
libs/common/src/models/response/list.response.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { BaseResponse } from "./base.response";
|
||||
|
||||
export class ListResponse<T> extends BaseResponse {
|
||||
data: T[];
|
||||
continuationToken: string;
|
||||
|
||||
constructor(response: any, t: new (dataResponse: any) => T) {
|
||||
super(response);
|
||||
const data = this.getResponseProperty("Data");
|
||||
this.data = data == null ? [] : data.map((dr: any) => new t(dr));
|
||||
this.continuationToken = this.getResponseProperty("ContinuationToken");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user