Skip to content

Commit

Permalink
feat: data-type now handeled by getValue value-type
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Pagan committed Apr 13, 2023
1 parent ab5b2c6 commit 4715d3e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,10 @@ const CoCreateUser = {
org_id = crud.socket.config.organization_id;

let data = {document: {}};
//. get form data
elements.forEach(el => {
let name = el.getAttribute('name');
let value = el.getValue();
if (!name || !value) return;

if (el.getAttribute('data-type') == 'array') {
value = [value];
}
data.document[name] = value;
});
data['collection'] = 'users'
Expand All @@ -172,7 +167,6 @@ const CoCreateUser = {
crud.createDocument(data).then((response) => {
self.setDocumentId('users', response.document_id);
data.database = org_id
data.document_id = response.document_id
data.document['_id'] = response.document_id
data.organization_id = org_id
crud.createDocument(request).then((response) => {
Expand Down

0 comments on commit 4715d3e

Please sign in to comment.