Changed id type to uuid.

This commit is contained in:
Naida Vatric
2020-02-13 10:43:30 +01:00
parent 9c234a85fd
commit 9bcadffe9c
11 changed files with 72 additions and 39 deletions

View File

@@ -33,7 +33,7 @@ const postWelcome = async (req, res) => {
const adTypeStringId = getAdTypeString(publishAdType);
try {
//Firt we create new Kivi Ad Original object in db then new Real Estate
//First we create new Kivi Ad Original object in db then new Real Estate
//Problem with id-s
const newKiviOriginal = await createKiviOriginal({
email: ""
@@ -42,13 +42,13 @@ const postWelcome = async (req, res) => {
const newRealEstate = await createRealEstate({
adType: adTypeStringId,
realEstateType: AD_CATEGORY.FLAT.id,
//Temp variables because of the not null constraints
//Temp variable because of the not null constraints
url: "http://localhost:5000/",
originAgencyName: AD_AGENCY.KIVI,
agencyObjectId: newKiviOriginal.kiviAdId
});
nextStepUrl = `/objavinekretninu/${newRealEstate.id}`;
nextStepUrl = `/objavinekretninu/${newKiviOriginal.kiviAdId}`;
} catch (error) {
console.log(error);
nextStepUrl = `/`;