fix: upload product
This commit is contained in:
parent
f142dc66c1
commit
15852b1ecb
|
@ -28,7 +28,9 @@ export class Product extends BaseModel {
|
||||||
@Column()
|
@Column()
|
||||||
status: string;
|
status: string;
|
||||||
|
|
||||||
@Column()
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
price: number;
|
price: number;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
import { forwardRef, HttpException, HttpStatus, Inject, Injectable } from '@nestjs/common';
|
import {
|
||||||
|
forwardRef,
|
||||||
|
HttpException,
|
||||||
|
HttpStatus,
|
||||||
|
Inject,
|
||||||
|
Injectable,
|
||||||
|
} from '@nestjs/common';
|
||||||
import { CreateUserDto } from './dto/create-user.dto';
|
import { CreateUserDto } from './dto/create-user.dto';
|
||||||
import { UpdateUserDto } from './dto/update-user.dto';
|
import { UpdateUserDto } from './dto/update-user.dto';
|
||||||
import { Connection, EntityNotFoundError, Not, Repository } from 'typeorm';
|
import { Connection, EntityNotFoundError, Not, Repository } from 'typeorm';
|
||||||
|
@ -335,7 +341,6 @@ export class UsersService {
|
||||||
userDetailData.name = updateUserDto.name;
|
userDetailData.name = updateUserDto.name;
|
||||||
userDetailData.phone_number = updateUserDto.phone_number;
|
userDetailData.phone_number = updateUserDto.phone_number;
|
||||||
|
|
||||||
|
|
||||||
await this.connection.transaction(async (manager) => {
|
await this.connection.transaction(async (manager) => {
|
||||||
await manager.save(userData);
|
await manager.save(userData);
|
||||||
await manager.save(userDetailData);
|
await manager.save(userDetailData);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user