Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cocreate/api

Package Overview
Dependencies
Maintainers
1
Versions
258
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cocreate/api - npm Package Compare versions

Comparing version 1.18.2 to 1.19.0

12

package.json
{
"name": "@cocreate/api",
"version": "1.18.2",
"version": "1.19.0",
"description": "A simple api helper component in vanilla javascript used by JavaScript developers to create thirdparty api intergrations. CoCreate-api includes the client component and server side for api processing. Thirdparty apis can be accessible using HTML5 attributes and/or JavaScript API. ",

@@ -62,9 +62,9 @@ "keywords": [

"dependencies": {
"@cocreate/actions": "^1.14.0",
"@cocreate/crud-client": "^1.31.0",
"@cocreate/actions": "^1.15.1",
"@cocreate/crud-client": "^1.32.2",
"@cocreate/element-prototype": "^1.15.0",
"@cocreate/render": "^1.35.0",
"@cocreate/socket-client": "^1.35.0",
"@cocreate/utils": "^1.29.0"
"@cocreate/render": "^1.37.1",
"@cocreate/socket-client": "^1.36.1",
"@cocreate/utils": "^1.30.0"
}
}

@@ -10,49 +10,9 @@ class CoCreateApi {

let org = await CRUD.send({
method: 'object.read',
array: "organizations",
key: config["key"],
organization_id: config["organization_id"],
object: {
_id: config["organization_id"]
}
let organization = await this.crud.getOrganization(config.organization_id);
});
if (!org || !org.object && !org.object[0]) {
console.log(component, " Error GET ORG in : ", e);
if (!organization.error)
return false;
}
return org.object[0];
return organization
}
async getApiKey(organization_id, name) {
this.organizations[organization_id] = this.getOrganization(organization_id, name)
this.organizations[organization_id] = await this.organizations[organization_id]
return this.organizations[organization_id]
}
async getOrganizationNew(organization_id, name) {
let organization = await this.crud.send({
method: 'object.read',
database: organization_id,
array: 'organizations',
object: [{ _id: organization_id }],
organization_id
})
if (organization
&& organization.object
&& organization.object[0]) {
if (organization.object[0].apis && organization.object[0].apis[name]) {
return organization.object[0].apis && organization.object[0].apis[name]
} else
return { [this.name]: false, error: 'An apikey could not be found' }
} else {
return { serverOrganization: false, error: 'An organization could not be found' }
}
}
}

@@ -59,0 +19,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc