feat: Complete stub services with real implementations and graceful not-configured responses
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:
Vantz Stockwell
2026-02-21 13:33:08 -05:00
parent e1a3ea3b78
commit a181ed7ded
11 changed files with 164 additions and 60 deletions

View File

@@ -4,6 +4,8 @@ import {
ConflictException,
BadRequestException,
NotFoundException,
NotImplementedException,
Logger,
} from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
@@ -21,6 +23,8 @@ import { UpdateProfileDto } from './dto/update-profile.dto';
@Injectable()
export class AuthService {
private readonly logger = new Logger(AuthService.name);
constructor(
@InjectRepository(User)
private userRepository: Repository<User>,
@@ -294,21 +298,16 @@ export class AuthService {
}
async forgotPassword(email: string) {
// Stub - SMTP integration later
console.log(`Password reset requested for: ${email}`);
// In production, generate reset token, save to DB, send email
// SMTP integration pending — returns 200 to avoid leaking account enumeration
this.logger.warn(`Password reset requested for ${email} — SMTP not yet configured`);
return {
message: 'If an account with that email exists, a password reset link has been sent.',
message: 'Password reset is not yet configured. Contact your administrator.',
};
}
async resetPassword(token: string, password: string) {
// Stub - SMTP integration later
console.log(`Password reset with token: ${token}`);
// In production, validate token, update password
return {
message: 'Password has been reset successfully.',
};
async resetPassword(token: string, _password: string) {
this.logger.warn(`Password reset attempted with token ${token} — SMTP not yet configured`);
throw new NotImplementedException('Password reset not yet configured');
}
// Helper methods