Story Maker
    Preparing search index...

    Function insertTeam

    • Inserts a new team into the database and adds it to the owner's teams.

      Parameters

      • name: string

        The name of the team.

      • owner: User

        The user who is creating the team.

      Returns Promise<InsertOneResult<Document>>

      A promise that resolves to the result of the insert operation.

      If the transaction fails.