feat: wire HuntingController/HuntingModule and enrich current-location with monster pool
Registers HuntingModule (POST /api/hunts) into the DI graph alongside its new entities, and adds possibleMonsters (enabled LocationMonster pool, weight-descending, empty when hunting is disabled) to WorldService.getCurrentLocation. Also updates the pre-existing DB-less app.e2e-spec.ts to override HuntingModule the same way the other feature modules already are, since it now needs a real DataSource.
This commit is contained in:
13
apps/api/src/hunting/hunting.controller.ts
Normal file
13
apps/api/src/hunting/hunting.controller.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Controller, Post } from '@nestjs/common';
|
||||
import { DEMO_CHARACTER_ID } from '../demo/demo-character.constants';
|
||||
import { HuntResultDto, HuntingService } from './hunting.service';
|
||||
|
||||
@Controller('hunts')
|
||||
export class HuntingController {
|
||||
constructor(private readonly huntingService: HuntingService) {}
|
||||
|
||||
@Post()
|
||||
startHunt(): Promise<HuntResultDto> {
|
||||
return this.huntingService.startHunt(DEMO_CHARACTER_ID);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user