Database is running properly except adding product others working fine
Api call looks like
createProduct(credentials) { return Api().post('/api/products/createProduct', credentials) },
i dont know whats wrong
Terminal log on adding product
::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "OPTIONS /api/products/createProduct HTTP/1.1" 204 0 "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" ::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "POST /api/products/createProduct HTTP/1.1" 200 36 "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" ::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "OPTIONS /api/products/getAllProducts HTTP/1.1" 204 0 "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" Executing (default): SELECT Product
.id
, Product
.code
, Product
.title
, Product
.subtitle
, Product
.description
, Product
.amount
, Product
.rating
, Product
.peopleRated
, Product
.currency
, Product
.sales
, Product
.image1
, Product
.image2
, Product
.image3
, Product
.image4
, Product
.image5
, Product
.image6
, Product
.image7
, Product
.image8
, Product
.image9
, Product
.image10
, Product
.createdAt
, Product
.updatedAt
, Product
.CategoryId
, Product
.SubCategoryId
, Product
.SubSubCategoryId
, Category
.id
AS Category.id
, Category
.name
AS Category.name
, Category
.createdAt
AS Category.createdAt
, Category
.updatedAt
AS Category.updatedAt
, SubCategory
.id
AS SubCategory.id
, SubCategory
.name
AS SubCategory.name
, SubCategory
.createdAt
AS SubCategory.createdAt
, SubCategory
.updatedAt
AS SubCategory.updatedAt
, SubCategory
.CategoryId
AS SubCategory.CategoryId
, SubSubCategory
.id
AS SubSubCategory.id
, SubSubCategory
.name
AS SubSubCategory.name
, SubSubCategory
.createdAt
AS SubSubCategory.createdAt
, SubSubCategory
.updatedAt
AS SubSubCategory.updatedAt
, SubSubCategory
.SubCategoryId
AS SubSubCategory.SubCategoryId
FROM Products
AS Product
LEFT OUTER JOIN Categories
AS Category
ON Product
.CategoryId
= Category
.id
LEFT OUTER JOIN SubCategories
AS SubCategory
ON Product
.SubCategoryId
= SubCategory
.id
LEFT OUTER JOIN SubSubCategories
AS SubSubCategory
ON Product
.SubSubCategoryId
= SubSubCategory
.id
ORDER BY Product
.createdAt
DESC; ::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "GET /api/products/getAllProducts HTTP/1.1" 304 - "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" ::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "OPTIONS /api/products/getProductRating/NaN HTTP/1.1" 204 0 "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" ::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "OPTIONS /api/products/getRecommendation/undefined/8 HTTP/1.1" 204 0 "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" Executing (default): SELECT rating
, peopleRated
FROM Products
AS Product
WHERE Product
.id
= 'NaN'; Executing (default): SELECT id
, title
, amount
, currency
, rating
, sales
, image1
, CategoryId
, SubCategoryId
, SubSubCategoryId
FROM Products
AS Product
WHERE Product
.SubSubCategoryId
= 'undefined' ORDER BY Product
.createdAt
DESC LIMIT 8; ::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "GET /api/products/getProductRating/NaN HTTP/1.1" 304 - "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" ::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "GET /api/products/getRecommendation/undefined/8 HTTP/1.1" 304 - "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" ::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "OPTIONS /api/products/getProduct/NaN HTTP/1.1" 204 0 "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" Executing (default): SELECT id
, code
, title
, subtitle
, description
, amount
, rating
, peopleRated
, currency
, sales
, image1
, image2
, image3
, image4
, image5
, image6
, image7
, image8
, image9
, image10
, createdAt
, updatedAt
, CategoryId
, SubCategoryId
, SubSubCategoryId
FROM Products
AS Product
WHERE Product
.id
= 'NaN'; ::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "GET /api/products/getProduct/NaN HTTP/1.1" 304 - "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" ::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "OPTIONS /api/review/getReviewList/NaN HTTP/1.1" 204 0 "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" Executing (default): SELECT Review
.id
, Review
.rating
, Review
.comment
, Review
.createdAt
, Review
.updatedAt
, Review
.UserId
, Review
.ProductId
, User
.id
AS User.id
, User
.profileImage
AS User.profileImage
, User
.firstName
AS User.firstName
, User
.lastName
AS User.lastName
, Product
.id
AS Product.id
, Product
.rating
AS Product.rating
, Product
.peopleRated
AS Product.peopleRated
FROM Reviews
AS Review
LEFT OUTER JOIN Users
AS User
ON Review
.UserId
= User
.id
LEFT OUTER JOIN Products
AS Product
ON Review
.ProductId
= Product
.id
WHERE Review
.ProductId
= 'NaN' ORDER BY Review
.createdAt
DESC; ::ffff:127.0.0.1 - - [28/Feb/2022:04:28:59 +0000] "GET /api/review/getReviewList/NaN HTTP/1.1" 304 - "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0"
if there is any possiblity if this is caused by node version? if yes send me the node version your used in this project
Thank you