Skip to content

Commit

Permalink
fix: update method to use object.update etc
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Oct 30, 2023
1 parent 3e69881 commit 3d8bc93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const CoCreateUser = {

let data = await Elements.save(action.form)
let user = data[0]
// data.method = 'create.object'
// data.method = 'object.create'
// data['array'] = array

// data.organization_id = organization_id;
Expand All @@ -44,7 +44,7 @@ const CoCreateUser = {
// if (!socket[0] || !socket[0].connected || window && !window.navigator.onLine) {
let key = {
status: 'await',
method: 'create.object',
method: 'object.create',
array: 'keys',
object: {
type: "user",
Expand Down Expand Up @@ -88,7 +88,7 @@ const CoCreateUser = {
}

let request = {
method: 'read.object',
method: 'object.read',
array: 'keys',
$filter: {
query
Expand Down
8 changes: 4 additions & 4 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class CoCreateUser {
async signUp(data) {
try {
if (data.user) {
data.user.method = 'create.object'
data.user.method = 'object.create'
const response = await this.crud.send(data.user)
this.wsManager.send(response);
}

if (data.userKey) {
data.userKey.method = 'create.object'
data.userKey.method = 'object.create'
const response = await this.crud.send(data.userKey)
this.wsManager.send(response);
}
Expand All @@ -48,7 +48,7 @@ class CoCreateUser {
async signIn(data) {
const self = this;
try {
data.method = 'read.object'
data.method = 'object.read'
let socket = data.socket
delete data.socket

Expand Down Expand Up @@ -105,7 +105,7 @@ class CoCreateUser {
userStatus: data.userStatus
}

data.method = 'update.object'
data.method = 'object.update'
data = await this.crud.send(data)

if (data.socket)
Expand Down

0 comments on commit 3d8bc93

Please sign in to comment.