feat: add consumer accounts and business activities management
- Implemented AccountsService for managing consumer accounts including create, update, delete, and find operations. - Created DTOs for account creation and updates. - Developed BusinessActivitiesController and BusinessActivitiesService for handling business activities related to consumers. - Added complexes management with ComplexesController and ComplexesService. - Introduced POS management with ComplexPosesController and ComplexPosesService. - Created necessary DTOs for business activities and POS. - Established Licenses management with LicensesController and LicensesService. - Integrated consumer management with PartnerConsumersController and PartnerConsumersService. - Added Prisma module imports and service connections across modules.
This commit is contained in:
@@ -8,7 +8,7 @@ import { AppService } from './application.service'
|
||||
export class AppController {
|
||||
constructor(private service: AppService) {}
|
||||
|
||||
@Get('/check-version')
|
||||
@Get('check-version')
|
||||
@Public()
|
||||
checkVersion() {
|
||||
return this.service.checkVersion()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ResponseMapper } from '@/common/response/response-mapper'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
|
||||
@@ -6,6 +7,7 @@ export class AppService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async checkVersion() {
|
||||
return ResponseMapper.single({})
|
||||
return await this.prisma.applicationReleasedInfo.findFirst({
|
||||
where: {
|
||||
is_minimum_supported: true,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Public } from '@/common/decorators/public.decorator'
|
||||
import { TokenAccount } from '@/common/decorators/tokenInfo.decorator'
|
||||
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
||||
import { ConfigService } from './config.service'
|
||||
@@ -13,6 +14,7 @@ export class ConfigController {
|
||||
}
|
||||
|
||||
@Post()
|
||||
@Public()
|
||||
create(@TokenAccount('userId') consumerId: string, @Body() data: CreateConfigDto) {
|
||||
return this.configService.create(consumerId, data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user