Skip to content

Api · Repositories

0 modules · 0 exports · 1 repository · 0 e2e tests · 1 route

Every table a function queries, its own helpers included, read or written. Calls to other repositories are listed apart, their tables are on their own page.

ApiRepository

app/features/api/ApiRepository.server.ts
Tables
ApiTokenTournamentOrganizationTournamentOrganizationMemberUser
Calls
no other repositories
Imports
no other modules
Used by
1 loader1 action1 script2 other

Functions & values

function

findTokenByUserId

:8

Finds an API token for the given user ID and type.

export function findTokenByUserId(userId: number, type: ApiTokenType)
TablesApiToken
Unit tests (4)
function

generateToken

:18

Generates a new API token for the given user. Deletes any existing token of the same type before creating a new one.

export function generateToken(userId: number, type: ApiTokenType)
TablesApiToken
Unit tests (5)
function

findAllApiTokens

:41

Retrieves all valid API tokens and their types from users with API access.

export async function findAllApiTokens()
Unit tests (2)