AssociationRepository
app/features/associations/AssociationRepository.server.ts- Tables
- AssociationAssociationMemberPlusTierUserUserSubmittedImage
- Calls
- FriendRepository
- Imports
- no other modules
- Used by
- 3 loaders3 actions1 script1 other
Functions & values
export async function findById( associationId: number, options: FindOptions = { withMembers: false }, )
Actions/associations
export async function findByMemberUserId( userId: number, options: FindOptions = { withMembers: false }, )
Actions/associations/scrims
export async function findByInviteCode( inviteCode: string, options: FindOptions = { withMembers: false }, )
export async function findInviteCodeById(associationId: number)
TablesAssociation
Loaders/associations
export function insert({ userId, ...associationArgs }: InsertArgs)
Actions/associations/new
export function insertMember({ associationId, userId, }: { associationId: number; userId: number; })
TablesAssociationMember
Actions/associations
export function updateMemberRole({ associationId, userId, role, }: { associationId: number; userId: number; role: Tables["AssociationMember"]["role"]; })
TablesAssociationMember
Actions/associations
export function deleteMember({ associationId, userId, }: { associationId: number; userId: number; })
TablesAssociationMember
Actions/associations
Removes the member and, when they were the admin, promotes newAdminUserId in their place.
export function handleMemberLeaving({ associationId, userId, newAdminUserId, }: { associationId: number; userId: number; newAdminUserId?: number; })
TablesAssociationMember
Actions/associations