node_test
    Preparing search index...

    Class UserRepository

    UserRepository

    A repository for managing users in the database.

    Index

    Constructors

    Methods

    • Parameters

      • email: string

        The email address to search for.

      Returns Promise<null | User>

      The user if found, otherwise null.

      findByEmail

      Finds a user by their email address.

    • Parameters

      • id: string

        The ID of the user to find.

      Returns Promise<null | User>

      The user if found, otherwise null.

      findById

      Finds a user by their ID.

    • Parameters

      • user: Omit<User, "_id" | "createdAt">

        The user to save.

      Returns Promise<ObjectId>

      The ID of the newly created user.

      save

      Saves a new user to the database.