remove id before create Listing, set location/companyLocation to null if not set
This commit is contained in:
@@ -176,6 +176,7 @@ export class BusinessListingService {
|
||||
data.updated = new Date();
|
||||
const validatedBusinessListing = BusinessListingSchema.parse(data);
|
||||
const convertedBusinessListing = convertBusinessToDrizzleBusiness(data);
|
||||
delete convertedBusinessListing.id;
|
||||
const [createdListing] = await this.conn.insert(businesses).values(convertedBusinessListing).returning();
|
||||
return convertDrizzleBusinessToBusiness(createdListing);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user