Skip to content

Img upload · Repositories

0 modules · 0 exports · 1 repository · 0 e2e tests · 1 route

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.

ImageRepository

app/features/img-upload/ImageRepository.server.ts
Tables
ArtCalendarEventTeamUnvalidatedUserSubmittedImageUser
Calls
no other repositories
Imports
no other modules
Used by
2 loaders1 action1 script2 other

Functions & values

function

findById

:9

Unvalidated image's submitter with its calendar event data.

export function findById(id: number)
Unit tests (3)
function

deleteById

:26

Deletes an image and its art entry.

export function deleteById(id: number)
Unit tests (2)
function

countUnvalidatedArt

:37

Count of the author's unvalidated art images.

export async function countUnvalidatedArt(authorId: number)
Unit tests (3)
function

countUnvalidatedBySubmitterUserId

:120

Count of the user's unvalidated images connected to a team, art or event (orphans excluded); gates image() uploads.

export async function countUnvalidatedBySubmitterUserId(userId: number)
Unit tests (5)
function

validateById

:129

Marks an image as validated.

export function validateById(id: number)
Unit tests (2)
function

insert

:138

Inserts an unvalidated image row without an owner. Returns the inserted row.

export function insert(
	args: TablesInsertable["UnvalidatedUserSubmittedImage"],
	trx?: Transaction<DB>,
)