Appearance
ema / @internals/db / MongoUserOwnActorDB
Class: MongoUserOwnActorDB
Defined in: db/mongo.user_own_actor.ts:13
MongoDB-based implementation of UserOwnActorDB Stores user own actor relations in a MongoDB collection
Implements
Constructors
Constructor
ts
new MongoUserOwnActorDB(mongo): MongoUserOwnActorDB;Defined in: db/mongo.user_own_actor.ts:26
Creates a new MongoUserOwnActorDB instance
Parameters
mongo
MongoDB instance to use for database operations
Returns
MongoUserOwnActorDB
Properties
collections
ts
collections: string[];Defined in: db/mongo.user_own_actor.ts:20
The collection names being accessed
Methods
addActorToUser()
ts
addActorToUser(entity): Promise<boolean>;Defined in: db/mongo.user_own_actor.ts:64
Adds an actor to a user
Parameters
entity
The user own actor relation data to add
Returns
Promise<boolean>
Promise resolving to true if added, false if already exists
Implementation of
listUserOwnActorRelations()
ts
listUserOwnActorRelations(req): Promise<UserOwnActorRelation[]>;Defined in: db/mongo.user_own_actor.ts:35
Lists user own actor relations by user id or actor id
Parameters
req
ListUserOwnActorRelationsRequest
The request to list user own actor relations
Returns
Promise<UserOwnActorRelation[]>
Promise resolving to an array of user own actor relation data
Implementation of
UserOwnActorDB.listUserOwnActorRelations
removeActorFromUser()
ts
removeActorFromUser(entity): Promise<boolean>;Defined in: db/mongo.user_own_actor.ts:89
Removes an actor from a user
Parameters
entity
The user own actor relation data to remove
Returns
Promise<boolean>
Promise resolving to true if removed, false if not found