Skip to main content

Module credit_registration_admin

Module credit_registration_admin 

Source
Expand description

Handlers for HTTP requests to /api/v0/main-frontend/credit-registration-admin.

Every mutating handler writes its credit_registration_admin_actions row in the transaction that has the effect. Admins see recipient addresses in full and the scrubbed study registry bodies; the registry’s own error text is returned to nobody.

ModulesΒ§

account_linking πŸ”’
The account-linking funnel, resending and hand-resolving linking mails, and manual links.
api_log πŸ”’
The Suotar API log tab: one row per HTTP call to the study registry, and what each covered.
audit πŸ”’
The Audit tab: every hand action on the pipeline, whoever took it.
courses πŸ”’
The Courses tab: one row per Suotar-enabled course module, with its configuration validated.
dashboard πŸ”’
The Overview tab, the Suotar health panel and phase pause/resume/run-now controls.
errors πŸ”’
The Errors & stuck tab: what is going wrong by error code, and which rows want a human.
history πŸ”’
The Pipeline tab’s history: queue depth per state per day, and the flow through each.
ledger πŸ”’
Viewing and hand-transitioning rows of the credit registration ledger.
materialize πŸ”’
Manually running the two database-only steps that turn eligible completions into ledger rows.
phases πŸ”’
The Workers tab: one row per pipeline phase, with the queue each is responsible for.
reconciliation πŸ”’
The Reconciliation tab: the failures defined by an absence, which no error count can catch.
student_numbers πŸ”’
Listing and unlinking verified student numbers, for spot-checking and support.

StructsΒ§

AdminLinkingEmail
MainFrontendCreditRegistrationAdminApiDoc πŸ”’

FunctionsΒ§

_add_routes
authorize_credit_registration_admin πŸ”’
Every handler here gates on the same check; a submodule calls this instead of repeating it.
build_linking_emails πŸ”’
Shared by the ledger detail view and the account-linking admin views: both show a person’s linking mails alongside the token each one carries.
one_or_many πŸ”’
serde_urlencoded reads a single occurrence of a key as a scalar, not a one-element sequence, so a Vec field otherwise refuses a query string that repeats the parameter zero or one times.
required_reason πŸ”’
Refuses an empty or whitespace reason. Every audited action names one.