LFGRepository
app/features/lfg/LFGRepository.server.ts- Tables
- LFGPostPlusTierTeamTeamMemberWithSecondaryTenStarWeaponUserUserSubmittedImageUserWeaponPool
- Calls
- no other repositories
- Imports
- no other modules
- Used by
- 2 loaders2 actions1 repository1 script2 other
Functions & values
Page of the LFG board as the actor sees it: their own posts first, then the most recently bumped. Expired posts are only shown to their author, plus tier restricted ones to members of the tier or a better one.
export function findBoardPage({ filters, page, pageSize, containingPostId, }: { filters: BoardFilters; page: number; pageSize: number; /** Serves the page holding this post instead of `page`, when it is on the board. */ containingPostId: number | null; })
The post if it is visible to the actor, see {@link findBoardPage}.
export async function findVisibleById(id: number)
The actor's own posts, expired and plus tier restricted ones included.
export async function findAllOwn()
Posts of one author visible to the actor, see {@link findBoardPage}.
export function findByAuthorUserId(authorId: number)
Unit tests (5)
User ids of the author and team members of every post visible to the actor, see {@link findBoardPage}.
export async function findAllVisibleParticipantIds()
Unit tests (1)
export function insertPost( args: Omit<TablesInsertable["LFGPost"], "updatedAt">, )
export function updatePost( postId: number, args: Omit<TablesInsertable["LFGPost"], "updatedAt" | "authorId">, )
export function deletePostsByTeamId(teamId: number, trx?: Transaction<DB>)
Unit tests not about one export (12)
- LFGRepository.findBoardPage visibility › shows
- LFGRepository.findBoardPage visibility › hides
- LFGRepository.findBoardPage visibility › puts the viewer's own posts first
- LFGRepository.findBoardPage filters › weapons
- LFGRepository.findBoardPage filters › plusTier matches a post whose team member is in a better plus server
- LFGRepository.findBoardPage filters › language matches posts listing the language
- LFGRepository.findBoardPage filters › timezones matches posts in one of the timezones
- LFGRepository.findBoardPage filters › postIds matches the listed posts only