diff --git a/src/app.controller.ts b/src/app.controller.ts deleted file mode 100644 index cce879ee622146012901c9adb47ef40c0fd3a555..0000000000000000000000000000000000000000 --- a/src/app.controller.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Controller, Get } from '@nestjs/common'; -import { AppService } from './app.service'; - -@Controller() -export class AppController { - constructor(private readonly appService: AppService) {} - - @Get() - getHello(): string { - return this.appService.getHello(); - } -} diff --git a/src/user/user.service.ts b/src/user/user.service.ts index 4833b7eb8ccffd2beaa9dadb922560ad9fbc96d7..840d8325650894c0e1ec0ffbe47e6b3b703cdc4a 100644 --- a/src/user/user.service.ts +++ b/src/user/user.service.ts @@ -36,4 +36,25 @@ export class UserService { } } + // liitytään peliin + async joinGame(game: GameDTO, data: UserDTO){ + try { + // etsi peli valinnan mukaan ja otetaan käyttäjän rooli kyseisestä pelistä talteen + const role = await this.gameRepository.findOne(); + return gamedata; + } catch (error) { + return error.message; + } + } + + // liitytään factionii + async joinFaction(): Promise<boolean>{ + try { + // tarkistetaan factionin salasana + return true; + } catch (error) { + return error; + } + } + }