PlusVotingRepository
app/features/plus-voting/PlusVotingRepository.server.ts- Tables
- PlusTierPlusVotePlusVotingResultUserUserSubmittedImageUserWidget
- Calls
- PlusSuggestionRepository
- Imports
- PlusVoting
- Used by
- 2 loaders1 action1 hook1 script2 other
Types
export type ResultsByMonthYearItem = Unwrapped<typeof findResultsByMonthYear>;
Loaders/plus/voting/results
export type UsersForVoting = { user: Pick<CommonUser, "id" | "username" | "avatar"> & { bio: Bio | null; }; suggestion?: PlusSuggestionRepository.FindAllByMonthItem; }[];
export type UpsertManyPlusVotesArgs = Pick< TablesInsertable["PlusVote"], | "month" | "year" | "tier" | "authorId" | "votedId" | "score" | "becomesValidAt" >[];
Functions & values
export async function findAllPlusTiersFromLatestVoting()
TablesPlusVotePlusVotingResult
export async function findResultsByMonthYear(args: MonthYear)
Loaders/plus/voting/results
export async function findAllUsersForVoting(loggedInUser: { id: number; plusTier: number; })
Unit tests (6)
export async function hasVoted(args: { authorId: number; month: number; year: number; })
TablesPlusVote
Loaders/plus/voting