From 7e4b891d378cfeddfb7fa35f2081dcec49274b95 Mon Sep 17 00:00:00 2001
From: Ronnie Friman <L4168@student.jamk.fi>
Date: Fri, 5 Jul 2019 19:40:58 +0300
Subject: [PATCH] documentation update

---
 src/shared/states.guard.ts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/shared/states.guard.ts b/src/shared/states.guard.ts
index 4a4b5d4..9e85e94 100644
--- a/src/shared/states.guard.ts
+++ b/src/shared/states.guard.ts
@@ -19,6 +19,8 @@ export class StatesGuard implements CanActivate {
     private gameRepository: Repository<GameEntity>,
   ) {}
 
+  // Checks the state for gameId and grants access if it matches the criteria
+  // allowed states are CREATED, STARTED, PAUSED, ENDED
   async canActivate(context: ExecutionContext): Promise<boolean> {
     // get game states that are allowed access, identified by @GameStates('state') decorators in controllers
     const states = this.reflector.get<string[]>('states', context.getHandler());
-- 
GitLab