Skip to content

Plus voting · Repositories

1 module · 2 exports · 1 repository · 3 e2e tests · 3 routes

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.

PlusVotingRepository

app/features/plus-voting/PlusVotingRepository.server.ts
Tables
PlusTierPlusVotePlusVotingResultUserUserSubmittedImageUserWidget
Calls
PlusSuggestionRepository
Imports
PlusVoting
Used by
2 loaders1 action1 hook1 script2 other

Types

type

ResultsByMonthYearItem

no JSDoc:64
export type ResultsByMonthYearItem = Unwrapped<typeof findResultsByMonthYear>;
type

UsersForVoting

no JSDoc:130
export type UsersForVoting = {
	user: Pick<CommonUser, "id" | "username" | "avatar"> & {
		bio: Bio | null;
	};
	suggestion?: PlusSuggestionRepository.FindAllByMonthItem;
}[];
type

UpsertManyPlusVotesArgs

no JSDoc:206
export type UpsertManyPlusVotesArgs = Pick<
	TablesInsertable["PlusVote"],
	| "month"
	| "year"
	| "tier"
	| "authorId"
	| "votedId"
	| "score"
	| "becomesValidAt"
>[];

Functions & values

function

findAllPlusTiersFromLatestVoting

no JSDoc:35
export async function findAllPlusTiersFromLatestVoting()
function

findResultsByMonthYear

no JSDoc:65
export async function findResultsByMonthYear(args: MonthYear)
function

hasVoted

no JSDoc:190
export async function hasVoted(args: {
	authorId: number;
	month: number;
	year: number;
})
TablesPlusVote
function

upsertMany

no JSDoc:216
export function upsertMany(votes: UpsertManyPlusVotesArgs)
TablesPlusVote