@cocreate/indexeddb 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/index.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.2.1](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.2.0...v1.2.1) (2022-09-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* define database in generateDB ([919b3c8](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/919b3c8a44b1489fde39b7d780da2f1824c7c4a8))
|
|
7
|
+
|
|
1
8
|
# [1.2.0](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.1.2...v1.2.0) (2022-09-28)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -719,6 +719,7 @@ async function generateDB(data) {
|
|
|
719
719
|
try {
|
|
720
720
|
// Create organization
|
|
721
721
|
let organization = {
|
|
722
|
+
database: organization_id,
|
|
722
723
|
collection: 'organizatons',
|
|
723
724
|
data: {
|
|
724
725
|
_id: organization_id,
|
|
@@ -732,6 +733,7 @@ async function generateDB(data) {
|
|
|
732
733
|
// Create apiKey permission
|
|
733
734
|
if (organization_id && apiKey) {
|
|
734
735
|
let permissions = {
|
|
736
|
+
database: organization_id,
|
|
735
737
|
collection: 'permissions',
|
|
736
738
|
data: {
|
|
737
739
|
_id: ObjectId(),
|
|
@@ -774,6 +776,7 @@ async function generateDB(data) {
|
|
|
774
776
|
// Create user
|
|
775
777
|
if (organization_id) {
|
|
776
778
|
let user = {
|
|
779
|
+
database: organization_id,
|
|
777
780
|
collection: 'users',
|
|
778
781
|
data: {
|
|
779
782
|
_id: user_id,
|
|
@@ -789,6 +792,7 @@ async function generateDB(data) {
|
|
|
789
792
|
// Create role permission
|
|
790
793
|
if (user_id) {
|
|
791
794
|
let role = {
|
|
795
|
+
database: organization_id,
|
|
792
796
|
collection: 'permissions',
|
|
793
797
|
data: {
|
|
794
798
|
_id: ObjectId(),
|
|
@@ -812,6 +816,7 @@ async function generateDB(data) {
|
|
|
812
816
|
// Create user permission
|
|
813
817
|
if (role_id) {
|
|
814
818
|
let data = {
|
|
819
|
+
database: organization_id,
|
|
815
820
|
collection: 'permissions',
|
|
816
821
|
data: {
|
|
817
822
|
_id: ObjectId(),
|