diff --git a/src/faction/faction.entity.ts b/src/faction/faction.entity.ts index 410723cc4f30c255db8077b9abf61923b5a8f100..42f3aca413b36455786494818f2ca06f50f50f2e 100644 --- a/src/faction/faction.entity.ts +++ b/src/faction/faction.entity.ts @@ -12,6 +12,7 @@ import { import { GameEntity } from '../game/game.entity'; import { Game_PersonEntity } from '../game/game.entity'; import { MapDrawingEntity } from '../draw/coordinate.entity'; +import { Exclude } from 'class-transformer'; //Faction, PowerUp, Faction_powerUp, FP_History, Score @@ -19,9 +20,12 @@ import { MapDrawingEntity } from '../draw/coordinate.entity'; export class FactionEntity { @PrimaryGeneratedColumn('uuid') factionId: string; @Column('text') factionName: string; - @Column({ type: 'text' }) factionPassword: string; @Column({ type: 'float' }) multiplier: number; + @Exclude() + @Column({ type: 'text' }) + factionPassword: string; + @OneToMany(type => Game_PersonEntity, game_persons => game_persons.faction) game_persons: Game_PersonEntity[]; @ManyToOne(type => GameEntity, game => game.factions) diff --git a/src/user/user.entity.ts b/src/user/user.entity.ts index 20f16a07b0a0eb2ea7759953b22dc9e3d0a5653e..f095a70399e53ab2b3934f5f46ca4bd2e11ecba6 100644 --- a/src/user/user.entity.ts +++ b/src/user/user.entity.ts @@ -9,12 +9,16 @@ import * as bcrypt from 'bcryptjs'; import * as jwt from 'jsonwebtoken'; import { Game_PersonEntity } from '../game/game.entity'; +import { Exclude } from 'class-transformer'; @Entity('Person') export class PersonEntity { @PrimaryGeneratedColumn('uuid') id: string; @Column({ type: 'text', unique: true }) name: string; - @Column('text') password: string; + + @Exclude() + @Column('text') + password: string; @OneToMany(type => Game_PersonEntity, game_persons => game_persons.person) game_persons: Game_PersonEntity[];