/
kochkatech
/
CorpGame
Обзор
Документация
Войти
/
kochkatech
/
CorpGame
Код
Запросы
1
Задачи
Вики
Пакеты
0
Релизы
1
CI/CD
Аналитика
dev
backend/src/branch/branch.controller.ts
26 строк
960 B
kochkareal
chore: добавлен .gitattributes, нормализованы переносы строк (LF везде, кроме .bat/.cmd)
06 авг 2026, 15:18
06 авг 2026, 15:18
c25ef1b
Код
Авторство
О чём код?
import { Body, Controller, Param, Post, UseGuards } from '@nestjs/common'; import { TeamGuard } from '../auth/team.guard'; import { CurrentTeam } from '../auth/current-team.decorator'; import { TeamTokenPayload } from '../auth/jwt.util'; import { BranchService } from './branch.service'; @UseGuards(TeamGuard) @Controller('team/branches') export class BranchController { constructor(private readonly branch: BranchService) {} @Post() open(@CurrentTeam() current: TeamTokenPayload, @Body('cityKey') cityKey: string) { return this.branch.open(current.sessionId, current.teamId, cityKey); } @Post(':id/collect') collect(@CurrentTeam() current: TeamTokenPayload, @Param('id') id: string) { return this.branch.collect(current.sessionId, current.teamId, id); } @Post(':id/upgrade') upgrade(@CurrentTeam() current: TeamTokenPayload, @Param('id') id: string) { return this.branch.upgrade(current.sessionId, current.teamId, id); } }