Skip to content

Commit

Permalink
fix: update config organization_Id to organization_id
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed May 6, 2022
1 parent 0e7f5be commit 929f871
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CoCreate.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
"config": {
"apiKey": "2061acef-0451-4545-f754-60cf8160",
"organization_Id": "5ff747727005da1c272740ab",
"organization_id": "5ff747727005da1c272740ab",
"host": "general.cocreate.app"
},

Expand Down
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script>
var config = {
apiKey: 'c2b08663-06e3-440c-ef6f-13978b42883a',
organization_Id: '5de0387b12e200ea63204d6c',
organization_id: '5de0387b12e200ea63204d6c',
host: 'ws.cocreate.app'
}
</script>
Expand Down
16 changes: 8 additions & 8 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const CoCreateUser = {

crud.send('login', {
"apiKey": window.config.apiKey,
"organization_id": window.config.organization_Id,
"organization_id": window.config.organization_id,
"collection": collection,
"loginData": loginData
});
Expand All @@ -78,7 +78,7 @@ const CoCreateUser = {
let { success, status, message, token } = data;

if (success) {
window.localStorage.setItem('organization_id', window.config.organization_Id);
window.localStorage.setItem('organization_id', window.config.organization_id);
window.localStorage.setItem("apiKey", window.config.apiKey);
window.localStorage.setItem("host", window.config.host);
window.localStorage.setItem('user_id', data['id']);
Expand Down Expand Up @@ -107,7 +107,7 @@ const CoCreateUser = {
getCurrentOrg: function(user_id, collection) {
crud.send('usersCurrentOrg', {
"apiKey": window.config.apiKey,
"organization_id": window.config.organization_Id,
"organization_id": window.config.organization_id,
"collection": collection || 'users',
"user_id": user_id,
});
Expand Down Expand Up @@ -263,11 +263,11 @@ const CoCreateUser = {
let newOrg_id = form.querySelector("input[collection='organizations'][name='_id']");
let user_id = form.querySelector("input[collection='users'][name='_id']");

const room = config.organization_Id;
const room = config.organization_id;

crud.send('createUserNew', {
apiKey: config.apiKey,
organization_id: config.organization_Id,
organization_id: config.organization_id,
collection: 'users',
newOrg_id: org_id,
user_id: user_id,
Expand Down Expand Up @@ -299,13 +299,13 @@ const CoCreateUser = {
});
data['current_org'] = org_id;
data['connected_orgs'] = [org_id];
data['organization_id'] = config.organization_Id;
data['organization_id'] = config.organization_id;

const room = config.organization_Id;
const room = config.organization_id;

crud.send('createUser', {
apiKey: config.apiKey,
organization_id: config.organization_Id,
organization_id: config.organization_id,
collection: 'users',
data: data,
orgDB: org_id
Expand Down

0 comments on commit 929f871

Please sign in to comment.