Add Legal Office seal and complete Azure CDN deployment
- Add Legal Office of the Master seal (SVG design with Maltese Cross, scales of justice, legal scroll) - Create legal-office-manifest-template.json for Legal Office credentials - Update SEAL_MAPPING.md and DESIGN_GUIDE.md with Legal Office seal documentation - Complete Azure CDN infrastructure deployment: - Resource group, storage account, and container created - 17 PNG seal files uploaded to Azure Blob Storage - All manifest templates updated with Azure URLs - Configuration files generated (azure-cdn-config.env) - Add comprehensive Azure CDN setup scripts and documentation - Fix manifest URL generation to prevent double slashes - Verify all seals accessible via HTTPS
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Handles payments, ledgers, rate models, and invoicing
|
||||
*/
|
||||
|
||||
import Fastify from 'fastify';
|
||||
import Fastify, { type FastifyRequest, type FastifyReply } from 'fastify';
|
||||
import fastifySwagger from '@fastify/swagger';
|
||||
import fastifySwaggerUI from '@fastify/swagger-ui';
|
||||
import {
|
||||
@@ -20,12 +20,12 @@ import {
|
||||
import { CreateLedgerEntrySchema, CreatePaymentSchema } from '@the-order/schemas';
|
||||
import { healthCheck as dbHealthCheck, getPool, createLedgerEntry, createPayment, updatePaymentStatus } from '@the-order/database';
|
||||
import { StripePaymentGateway } from '@the-order/payment-gateway';
|
||||
import { randomUUID } from 'crypto';
|
||||
|
||||
const logger = createLogger('finance-service');
|
||||
|
||||
const server = Fastify({
|
||||
logger,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const server: any = Fastify({
|
||||
logger: logger as any,
|
||||
requestIdLogLabel: 'requestId',
|
||||
disableRequestLogging: false,
|
||||
});
|
||||
@@ -74,10 +74,10 @@ async function initializeServer(): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
await registerSecurityPlugins(server);
|
||||
addCorrelationId(server);
|
||||
addRequestLogging(server);
|
||||
server.setErrorHandler(errorHandler);
|
||||
await registerSecurityPlugins(server as any);
|
||||
addCorrelationId(server as any);
|
||||
addRequestLogging(server as any);
|
||||
server.setErrorHandler(errorHandler as any);
|
||||
}
|
||||
|
||||
// Health check
|
||||
@@ -113,7 +113,8 @@ server.get(
|
||||
server.post(
|
||||
'/ledger/entry',
|
||||
{
|
||||
preHandler: [authenticateJWT, requireRole('admin', 'accountant', 'finance')],
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
preHandler: [authenticateJWT as any, requireRole('admin', 'accountant', 'finance') as any],
|
||||
schema: {
|
||||
...createBodySchema(CreateLedgerEntrySchema),
|
||||
description: 'Create a ledger entry',
|
||||
@@ -130,7 +131,7 @@ server.post(
|
||||
},
|
||||
},
|
||||
},
|
||||
async (request, reply) => {
|
||||
async (request: FastifyRequest, reply: FastifyReply) => {
|
||||
const body = request.body as {
|
||||
accountId: string;
|
||||
type: 'debit' | 'credit';
|
||||
@@ -158,7 +159,8 @@ server.post(
|
||||
server.post(
|
||||
'/payments',
|
||||
{
|
||||
preHandler: [authenticateJWT],
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
preHandler: [authenticateJWT as any],
|
||||
schema: {
|
||||
...createBodySchema(CreatePaymentSchema),
|
||||
description: 'Process a payment',
|
||||
@@ -175,7 +177,7 @@ server.post(
|
||||
},
|
||||
},
|
||||
},
|
||||
async (request, reply) => {
|
||||
async (request: FastifyRequest, reply: FastifyReply) => {
|
||||
const body = request.body as {
|
||||
amount: number;
|
||||
currency: string;
|
||||
|
||||
Reference in New Issue
Block a user