elioria-sst-x
    Preparing search index...

    Class SupabaseCipaVotingTokenRepository

    Implements

    Index
    db: PostgresJsDatabase<packages/db/src/schema> & {}

    The db value.

    • Generated

      Returns the result of findByElection.

      Parameters

      • electionId: string

        The electionId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaVotingToken[]>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, retrieve data through findByElection.

      Behavior: Async; accepts electionId and tenantId; returns a value; invokes this.db.select().from(cipaVotingTokens).where.

    • Generated

      Returns the result of findByToken.

      Parameters

      • token: string

        The token value.

      • tenantId: string

        The tenantId value.

      • electionId: string

        The electionId value.

      Returns Promise<CipaVotingToken | null>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, retrieve data through findByToken.

      Behavior: Async; accepts token and tenantId and electionId; returns a value; invokes this.db.select().from(cipaVotingTokens).where( and( eq(cipaV.

    • Generated

      Executes markUsed.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, run markUsed.

      Behavior: Async; accepts id and tenantId; returns a value; invokes this.db.update(cipaVotingTokens).set({ used: true, usedAt: n.