fix: Wave 1 — critical bug fixes across 9 files
All checks were successful
Test Asgard Runner / test (push) Successful in 3s
All checks were successful
Test Asgard Runner / test (push) Successful in 3s
- Fix double-prefix URL bugs in 4 analytics/revenue views (/api/api → /api) - Fix AdminDashboard quick-links routing (/platform-admin/* → /admin/*) - Fix MigrationView import missing Authorization header - Remove dead ConsoleModule from app.module (conflicts with NatsBridgeGateway on /ws) - Fix store.service.ts raw Error throws → NotFoundException/ForbiddenException - Fix payment-order entity FK (webstore_subscription_id → WebstoreSubscription) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,6 @@ import { AuthModule } from './modules/auth/auth.module';
|
||||
import { UsersModule } from './modules/users/users.module';
|
||||
import { LicensesModule } from './modules/licenses/licenses.module';
|
||||
import { ServersModule } from './modules/servers/servers.module';
|
||||
import { ConsoleModule } from './modules/console/console.module';
|
||||
import { PlayersModule } from './modules/players/players.module';
|
||||
import { WipesModule } from './modules/wipes/wipes.module';
|
||||
import { MapsModule } from './modules/maps/maps.module';
|
||||
@@ -86,7 +85,6 @@ import { NatsBridgeGateway } from './gateways/nats-bridge.gateway';
|
||||
UsersModule,
|
||||
LicensesModule,
|
||||
ServersModule,
|
||||
ConsoleModule,
|
||||
PlayersModule,
|
||||
WipesModule,
|
||||
MapsModule,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm';
|
||||
import { Module } from './module.entity';
|
||||
import { License } from './license.entity';
|
||||
import { WebstoreSubscription } from './webstore-subscription.entity';
|
||||
|
||||
@Entity('payment_orders')
|
||||
@Check(`"status" IN ('pending', 'completed', 'failed', 'refunded')`)
|
||||
@@ -52,7 +53,7 @@ export class PaymentOrder {
|
||||
@JoinColumn({ name: 'license_id' })
|
||||
license: License;
|
||||
|
||||
@ManyToOne(() => License, { onDelete: 'SET NULL', nullable: true })
|
||||
@ManyToOne(() => WebstoreSubscription, { onDelete: 'SET NULL', nullable: true })
|
||||
@JoinColumn({ name: 'webstore_subscription_id' })
|
||||
webstore_subscription: License | null;
|
||||
webstore_subscription: WebstoreSubscription | null;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Injectable, NotFoundException, ForbiddenException } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { Module } from '../../entities/module.entity';
|
||||
@@ -44,7 +44,7 @@ export class StoreService {
|
||||
|
||||
const module = await this.moduleRepo.findOne({ where: { id: moduleId } });
|
||||
if (!module) {
|
||||
throw new Error('Module not found');
|
||||
throw new NotFoundException('Module not found');
|
||||
}
|
||||
|
||||
const purchase = this.purchaseRepo.create({
|
||||
@@ -64,7 +64,7 @@ export class StoreService {
|
||||
});
|
||||
|
||||
if (!purchase) {
|
||||
throw new Error('Module not purchased');
|
||||
throw new ForbiddenException('Module not purchased');
|
||||
}
|
||||
|
||||
// Stub - would create module_installation record
|
||||
|
||||
Reference in New Issue
Block a user