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
Finds an API token for the given user ID and type.
export function findTokenByUserId(userId: number, type: ApiTokenType)
TablesApiToken
Unit tests (4)
Loaders/api
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)
Actions/api
Retrieves all valid API tokens and their types from users with API access.
export async function findAllApiTokens()