feat: Complete stub services with real implementations and graceful not-configured responses
All checks were successful
Test Asgard Runner / test (push) Successful in 2s
All checks were successful
Test Asgard Runner / test (push) Successful in 2s
- ChangelogService: inject PlatformChangelog repo, query with findAndCount(skip/take), return actual data
- ChangelogModule: add TypeOrmModule.forFeature([PlatformChangelog])
- MapsService: add uploadMap() — SHA-256 checksum, storage path, full entity save
- MapsController: add POST /maps/upload with FileInterceptor, map.manage permission, @UploadedFile
- AuthService: replace console.log stubs with Logger; forgotPassword returns 200 with clear message; resetPassword throws NotImplementedException
- PluginsService: searchUmod returns { results: [], message: 'not yet configured' } instead of bare []
- SteamService: add Logger.warn on every stub path (checkForceWipe, getPlayerSummary)
- SettingsService: add Logger; both Cloudflare DNS stubs emit Logger.warn before DB save
- MigrationService: add Logger; exportConfig logs warning + returns note field; importConfig throws NotImplementedException
- Install @types/multer dev dependency for Express.Multer.File type support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { ChangelogController } from './changelog.controller';
|
||||
import { ChangelogService } from './changelog.service';
|
||||
import { PlatformChangelog } from '../../entities/platform-changelog.entity';
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([PlatformChangelog])],
|
||||
controllers: [ChangelogController],
|
||||
providers: [ChangelogService],
|
||||
})
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
export interface ChangelogEntry {
|
||||
id: string;
|
||||
version: string;
|
||||
title: string;
|
||||
description: string;
|
||||
type: 'feature' | 'fix' | 'improvement' | 'breaking';
|
||||
created_at: string;
|
||||
}
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { PlatformChangelog } from '../../entities/platform-changelog.entity';
|
||||
|
||||
@Injectable()
|
||||
export class ChangelogService {
|
||||
constructor(
|
||||
@InjectRepository(PlatformChangelog)
|
||||
private readonly changelogRepo: Repository<PlatformChangelog>,
|
||||
) {}
|
||||
|
||||
async getEntries(
|
||||
page: number,
|
||||
limit: number,
|
||||
): Promise<{ entries: ChangelogEntry[]; total: number }> {
|
||||
// Stub — returns empty until changelog entries are seeded or managed
|
||||
return { entries: [], total: 0 };
|
||||
): Promise<{ entries: PlatformChangelog[]; total: number }> {
|
||||
const skip = (page - 1) * limit;
|
||||
|
||||
const [entries, total] = await this.changelogRepo.findAndCount({
|
||||
order: { published_at: 'DESC' },
|
||||
skip,
|
||||
take: limit,
|
||||
});
|
||||
|
||||
return { entries, total };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user