updating
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { IsDateString, IsEnum, IsOptional, IsString } from 'class-validator'
|
||||
import { AccountStatus, LicenseStatus, POSType } from 'generated/prisma/enums'
|
||||
|
||||
export class CreateLicenseDto {
|
||||
export class CreatePartnerLicenseDto {
|
||||
@IsString()
|
||||
first_name: string
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||
import { CreateLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||
import { CreatePartnerLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||
import { PartnerLicensesService } from './licenses.service'
|
||||
|
||||
@Controller('admin/partners/:partnerId/licenses')
|
||||
@@ -17,7 +17,10 @@ export class PartnerLicensesController {
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Param('partnerId') partnerId: string, @Body() data: CreateLicenseDto) {
|
||||
async create(
|
||||
@Param('partnerId') partnerId: string,
|
||||
@Body() data: CreatePartnerLicenseDto,
|
||||
) {
|
||||
return this.licensesService.create(partnerId, data)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { CreateLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||
import { CreatePartnerLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||
|
||||
@Injectable()
|
||||
export class PartnerLicensesService {
|
||||
@@ -105,7 +105,7 @@ export class PartnerLicensesService {
|
||||
return ResponseMapper.single(license)
|
||||
}
|
||||
|
||||
async create(partnerId: string, data: CreateLicenseDto) {
|
||||
async create(partnerId: string, data: CreatePartnerLicenseDto) {
|
||||
// const license = await this.prisma.$transaction(async tx => {
|
||||
// const user = await tx.user.upsert({
|
||||
// where: {
|
||||
|
||||
Reference in New Issue
Block a user