From 8208c9e6d0e443957e15c39962b369692cb1e028 Mon Sep 17 00:00:00 2001 From: Behzad Rabiei Date: Thu, 31 Oct 2024 16:59:07 +0400 Subject: [PATCH 1/2] feat: make modules platform agnostic --- package.json | 2 +- src/models/schemas/Module.schema.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d14596a..0bf77c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@togethercrew.dev/db", - "version": "3.0.70", + "version": "3.0.71", "description": "All interactions with DB", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/src/models/schemas/Module.schema.ts b/src/models/schemas/Module.schema.ts index 7e02c87..de330e4 100644 --- a/src/models/schemas/Module.schema.ts +++ b/src/models/schemas/Module.schema.ts @@ -20,16 +20,16 @@ const moduleSchema = new Schema( { platform: { type: Schema.Types.ObjectId, - required: true, ref: 'Platform', + default: null, }, metadata: { type: Schema.Types.Mixed, }, name: { type: String, - required: true, enum: Object.values(PlatformNames), + default: null, }, }, ], From 02a575486f8385b69eeeb6b279a814ca12d821b3 Mon Sep 17 00:00:00 2001 From: Behzad Rabiei Date: Thu, 31 Oct 2024 17:00:48 +0400 Subject: [PATCH 2/2] feat: add dynamicNft module --- src/config/enums.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config/enums.ts b/src/config/enums.ts index ab38256..fa31bb7 100644 --- a/src/config/enums.ts +++ b/src/config/enums.ts @@ -11,6 +11,7 @@ export enum PlatformNames { export enum ModuleNames { Hivemind = 'hivemind', ViolationDetection = 'violationDetection', + DynamicNft = 'dynamicNft', } export enum HivemindPlatformNames {