Every create, update and delete of a visa/master or sber order is now
recorded in visa_master_order_actions: who did it, finished or failed
(with the exception), and for an update only the columns that changed -
original before, changes after. Marking an order paid when a payment is
finalized is recorded the same way, with no user when the GBÜS callback
did it.
Actions are written in the transaction that changes the order, so one is
on record exactly when its change is; failed ones are written after the
rollback with the values they attempted. The payment finalize records
after its commit instead, so recording never holds up a payment GBÜS has
already taken. Updates that change nothing and creates that fail (no
order to attach to) are not recorded.
GET /visa-master-payment-orders/{id}/actions lists them, newest first;
GET /visa-master-payment-orders/{id}/actions/{actionId} adds original,
changes and exception. Both are staff-only and order-scoped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
visa-master-payment-orders mixed order CRUD with the GBÜS payment flow;
they are now visa-master-orders and visa-master-payment. payment-history
summaries, descriptions and params are in Turkmen with one shape
(what it returns, Tertip, Bellik), and its tag description lists the
endpoints in the order they are used.
@securityDefinitions.apikey moves to the end of the general info block:
swag read every line after it as its attributes, so @schemes and all
@tag.* declarations were silently dropped from the spec.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
appresult.Localize, the first admin middleware, rewrites JSON responses so
every {en, ru, tm} object becomes the plain string for ?lang= (tm, ru, en;
default tm), falling back tm -> ru -> en when that translation is empty.
?lang=all keeps the full objects for edit forms; other values are 400.
Key order and number precision are preserved; non-JSON responses and
/swagger are untouched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Web users may only CRUD their own records, operators stay in assigned branches, and admin/manager/superadmin keep full access.
Co-authored-by: Cursor <cursoragent@cursor.com>
The baked-in host and basePath pointed "Try it out" at the app's own listen
address, so requests from the browser never reached the server. doc.json is
now built from the incoming request, using X-Forwarded-Prefix to restore the
path prefix nginx strips before proxying.
Co-authored-by: Cursor <cursoragent@cursor.com>
Rename users table fields and loan documents table, expand branch billing credentials, switch to /api/admin prefix, refactor auth endpoints, replace PATCH with PUT for status updates, remove file upload APIs, and regenerate Swagger with ordered tags.
Co-authored-by: Cursor <cursoragent@cursor.com>