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';
import { GameEntity } from '../game/game.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')
export class MapDrawingEntity {
......
......@@ -13,7 +13,9 @@ import {
import { DrawService } from './draw.service';
import { Roles, GameStates } from '../shared/guard.decorator';
import { MapDrawingDTO } from './mapdrawing.dto';
import { GamePerson } from 'src/game/gameperson.decorator';
import { GamePerson } from '../game/gameperson.decorator';
/*
//////////////////////////////////////////////////////////////////////////
/// DrawController ///
......@@ -25,6 +27,8 @@ import { GamePerson } from 'src/game/gameperson.decorator';
/// Data return functions require atleast spectator role. ///
//////////////////////////////////////////////////////////////////////////
*/
@Controller('draw')
export class DrawController {
constructor(private drawService: DrawService) {}
......
......@@ -10,11 +10,12 @@ import {
import { FactionEntity } from '../faction/faction.entity';
import { Game_PersonEntity } from '../game/game.entity';
import { NotificationModule } from 'src/notifications/notifications.module';
/*
/////////////////////////////////////////////////////////////////////
/// Draw ///
/// - contains everything to do with mapdrawing data. ///
/////////////////////////////////////////////////////////////////////
*/
@Module({
imports: [
TypeOrmModule.forFeature([
......
......@@ -9,6 +9,10 @@ import {
import { MapDrawingDTO } from './mapdrawing.dto';
import { NotificationGateway } from '../notifications/notifications.gateway';
/*
DrawService contains handling of MapDrawings and MapDrawinghistory
*/
@Injectable()
export class DrawService {
constructor(
......
......@@ -22,7 +22,7 @@ import {
} from './faction.dto';
import { FactionService } from './faction.service';
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:
......
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