@@ -6,14 +6,12 @@ import {Auth, AuthUser} from '../auth/auth.decorator';
6
6
import { User } from '../user/user.schema' ;
7
7
import { Types } from 'mongoose' ;
8
8
import { EmpireService } from '../empire/empire.service' ;
9
- import { SystemService } from '../system/system.service' ;
10
9
import { Validated } from '../util/validated.decorator' ;
11
10
import { Throttled } from '../util/throttled.decorator' ;
12
11
import { ExplainedVariable , Variable } from './types' ;
13
12
import { explainVariable , getEmpireEffectSources } from './variables' ;
14
13
import { AggregateService } from './aggregate.service' ;
15
14
import { EmpireDocument } from '../empire/empire.schema' ;
16
- import { MemberService } from '../member/member.service' ;
17
15
18
16
@Controller ( 'games/:game/empires/:empire' )
19
17
@ApiTags ( 'Game Logic' )
@@ -22,9 +20,7 @@ import {MemberService} from '../member/member.service';
22
20
@Throttled ( )
23
21
export class GameLogicController {
24
22
constructor (
25
- private readonly memberService : MemberService ,
26
23
private readonly empireService : EmpireService ,
27
- private readonly systemService : SystemService ,
28
24
private readonly aggregateService : AggregateService ,
29
25
) {
30
26
}
@@ -111,7 +107,7 @@ ${Object.entries(aggregate.optionalParams ?? {}).map(([param, desc]) => `- \`${p
111
107
if ( currentUser . _id . equals ( empire . user ) ) {
112
108
return true ;
113
109
}
114
- if ( await this . memberService . isSpectator ( empire . game , currentUser . _id ) ) {
110
+ if ( await this . empireService . isSpectator ( currentUser . _id , empire . game ) ) {
115
111
// user is a spectator
116
112
return true ;
117
113
}
0 commit comments