Skip to content
Snippets Groups Projects
Commit 89019fe3 authored by Samuli Virtapohja's avatar Samuli Virtapohja
Browse files

draw folder audited

parent 05025de6
No related branches found
No related tags found
2 merge requests!59Development to master,!58Development to testing
...@@ -3,9 +3,11 @@ import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from 'typeorm'; ...@@ -3,9 +3,11 @@ import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from 'typeorm';
import { GameEntity } from '../game/game.entity'; import { GameEntity } from '../game/game.entity';
import { FactionEntity } from '../faction/faction.entity'; import { FactionEntity } from '../faction/faction.entity';
////////////////////////////////////////////////////////////////////// /*
/// Entities for different drawings in game and their histories /// MapDrawingEntity & MapDrawingHistoryEntity reflect database tables.
//////////////////////////////////////////////////////////////////////
MapDrawing ownershipCheck checks users rights to MapDrawing
*/
@Entity('MapDrawing') @Entity('MapDrawing')
export class MapDrawingEntity { export class MapDrawingEntity {
......
...@@ -13,7 +13,9 @@ import { ...@@ -13,7 +13,9 @@ import {
import { DrawService } from './draw.service'; import { DrawService } from './draw.service';
import { Roles, GameStates } from '../shared/guard.decorator'; import { Roles, GameStates } from '../shared/guard.decorator';
import { MapDrawingDTO } from './mapdrawing.dto'; import { MapDrawingDTO } from './mapdrawing.dto';
import { GamePerson } from 'src/game/gameperson.decorator'; import { GamePerson } from '../game/gameperson.decorator';
/*
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/// DrawController /// /// DrawController ///
...@@ -25,6 +27,8 @@ import { GamePerson } from 'src/game/gameperson.decorator'; ...@@ -25,6 +27,8 @@ import { GamePerson } from 'src/game/gameperson.decorator';
/// Data return functions require atleast spectator role. /// /// Data return functions require atleast spectator role. ///
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
*/
@Controller('draw') @Controller('draw')
export class DrawController { export class DrawController {
constructor(private drawService: DrawService) {} constructor(private drawService: DrawService) {}
......
...@@ -10,11 +10,12 @@ import { ...@@ -10,11 +10,12 @@ import {
import { FactionEntity } from '../faction/faction.entity'; import { FactionEntity } from '../faction/faction.entity';
import { Game_PersonEntity } from '../game/game.entity'; import { Game_PersonEntity } from '../game/game.entity';
import { NotificationModule } from 'src/notifications/notifications.module'; import { NotificationModule } from 'src/notifications/notifications.module';
/*
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
/// Draw /// /// Draw ///
/// - contains everything to do with mapdrawing data. /// /// - contains everything to do with mapdrawing data. ///
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
*/
@Module({ @Module({
imports: [ imports: [
TypeOrmModule.forFeature([ TypeOrmModule.forFeature([
......
...@@ -9,6 +9,10 @@ import { ...@@ -9,6 +9,10 @@ import {
import { MapDrawingDTO } from './mapdrawing.dto'; import { MapDrawingDTO } from './mapdrawing.dto';
import { NotificationGateway } from '../notifications/notifications.gateway'; import { NotificationGateway } from '../notifications/notifications.gateway';
/*
DrawService contains handling of MapDrawings and MapDrawinghistory
*/
@Injectable() @Injectable()
export class DrawService { export class DrawService {
constructor( constructor(
......
...@@ -22,7 +22,7 @@ import { ...@@ -22,7 +22,7 @@ import {
} from './faction.dto'; } from './faction.dto';
import { FactionService } from './faction.service'; import { FactionService } from './faction.service';
import { Roles, GameStates } from '../shared/guard.decorator'; import { Roles, GameStates } from '../shared/guard.decorator';
import { GamePerson } from 'src/game/gameperson.decorator'; import { GamePerson } from '../game/gameperson.decorator';
/* /*
FactionController is being used for routing: FactionController is being used for routing:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment