mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
multiple results response
This commit is contained in:
@@ -20,6 +20,15 @@ export class Response {
|
||||
return Response.error(message);
|
||||
}
|
||||
|
||||
static multipleResults(ids: string[]): Response {
|
||||
let msg = 'More than one result was found. Try getting a specific object by `id` instead. ' +
|
||||
'The following objects were found:';
|
||||
ids.forEach((id) => {
|
||||
msg += '\n' + id;
|
||||
});
|
||||
return Response.error(msg);
|
||||
}
|
||||
|
||||
static success(data?: BaseResponse): Response {
|
||||
const res = new Response();
|
||||
res.success = true;
|
||||
|
||||
Reference in New Issue
Block a user