Skip to content

Plus suggestions · Repositories

0 modules · 0 exports · 1 repository · 0 e2e tests · 4 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.

PlusSuggestionRepository

app/features/plus-suggestions/PlusSuggestionRepository.server.ts
Tables
PlusSuggestionPlusTierUserUserSubmittedImage
Calls
no other repositories
Imports
no other modules
Used by
1 loader3 actions1 route1 repository1 script3 other

Types

type

FindAllByMonthItem

no JSDoc:15
export type FindAllByMonthItem = Unwrapped<typeof findAllByMonth>;
interface

MonthSummary

no JSDoc:125
export interface MonthSummary {
	/** How many users have been suggested, per tier. */
	suggestionCountsByTier: Record<PlusTier, number>;
	/** Tiers `userId` has themselves been suggested to. */
	suggestedForTiers: Array<PlusTier>;
	/** Whether `userId` has started a suggestion of their own this month. */
	hasSuggested: boolean;
}
Only used inside the module

Functions & values

function

findMonthSummary

no JSDoc:134
export async function findMonthSummary(
	args: MonthYear & { userId: number | null },
): Promise<MonthSummary>
function

insert

no JSDoc:172
export function insert(args: Insertable<DB["PlusSuggestion"]>)
function

updateTextById

no JSDoc:180
export function updateTextById(id: number, text: string)
function

deleteById

no JSDoc:188
export function deleteById(id: number)
function

deleteWithCommentsBySuggestedUserId

no JSDoc:192
export function deleteWithCommentsBySuggestedUserId({
	tier,
	userId,
	month,
	year,
}: {
	tier: number;
	userId: number;
	month: number;
	year: number;
})