better-buddy-share-backend
    Preparing search index...

    Class UserDAO

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Methods

    • Ban a user globally with an optional reason.

      Parameters

      • user_id: number

        ID of the user to ban

      • reason: string | null = null

        Optional ban reason

      Returns Promise<User | null>

      Updated User record or null

    • Create a new user with username, email and password.

      Parameters

      • username: string

        Desired username

      • email: string

        User email

      • password: string

        Password (should be pre-hashed)

      Returns Promise<User | null>

      Newly created User record or null

    • Update user's profile picture (avatar).

      Parameters

      • user_id: number

        ID of the user

      • profile_picture: string

        New avatar URL or identifier

      Returns Promise<User | null>

      Updated User record or null