fix: change wording on error
This commit is contained in:
parent
3c8b018937
commit
c5b5a4ab06
|
@ -34,7 +34,7 @@ export class CommissionService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Commission not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -52,7 +52,7 @@ export class CommissionService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Commission not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
|
|
@ -25,7 +25,7 @@ export class ProductHistoryPriceService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Price not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
|
|
@ -54,7 +54,7 @@ export class ProductCategoriesService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Product Categories not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -76,7 +76,7 @@ export class ProductCategoriesService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Product Categories not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -97,7 +97,7 @@ export class ProductCategoriesService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Product Categories not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -122,7 +122,7 @@ export class ProductCategoriesService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Product Categories not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
|
|
@ -49,7 +49,7 @@ export class ProductSubCategoriesService {
|
|||
.createQueryBuilder('product_sub_categories')
|
||||
.leftJoinAndSelect('product_sub_categories.category', 'category');
|
||||
|
||||
if (category != 'null') {
|
||||
if (category != 'null' && category) {
|
||||
baseQuery.where({
|
||||
category: category,
|
||||
});
|
||||
|
@ -90,7 +90,7 @@ export class ProductSubCategoriesService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Product Sub Categories not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -111,7 +111,7 @@ export class ProductSubCategoriesService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Product Sub Categories not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -140,7 +140,7 @@ export class ProductSubCategoriesService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Product Sub Categories not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
|
|
@ -216,7 +216,7 @@ export class ProductService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Product not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -234,7 +234,7 @@ export class ProductService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Product not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -283,7 +283,7 @@ export class ProductService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Product not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
|
|
@ -66,7 +66,7 @@ export class CoaService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'COA not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
|
|
@ -164,7 +164,7 @@ export class SupplierService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'Supplier not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
|
|
@ -205,7 +205,7 @@ export class UsersService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'User not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -228,7 +228,7 @@ export class UsersService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'User not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -258,7 +258,7 @@ export class UsersService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'User not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -276,7 +276,7 @@ export class UsersService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'User not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -337,7 +337,7 @@ export class UsersService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'User not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
@ -371,7 +371,7 @@ export class UsersService {
|
|||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Data not found',
|
||||
error: 'User not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user