1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

sub out create command

This commit is contained in:
Kyle Spearrin
2018-05-14 21:19:49 -04:00
parent 428f46af06
commit b5507813ab
4 changed files with 74 additions and 1 deletions

View File

@@ -1,10 +1,13 @@
import { CipherType } from 'jslib/enums/cipherType';
import { LoginRequest } from './loginRequest';
import { SecureNoteRequest } from './secureNoteRequest';
import { CardRequest } from './cardRequest';
import { IdentityRequest } from './identityRequest';
import { FieldRequest } from './fieldRequest';
import { CipherView } from 'jslib/models/view/cipherView';
export class CipherRequest {
static template(): CipherRequest {
var req = new CipherRequest();
@@ -22,6 +25,12 @@ export class CipherRequest {
return req;
}
static toView(req: CipherRequest) {
const view = new CipherView();
view.name = req.name;
return view;
}
type: CipherType;
folderId: string;
organizationId: string;

View File

@@ -1,3 +1,11 @@
import { FolderView } from 'jslib/models/view/folderView';
export class FolderRequest {
static toView(req: FolderRequest) {
const view = new FolderView();
view.name = req.name;
return view;
}
name: string;
}