minor fix to avoid the creation of '' templates since crow is incapable of routing those to /<string> while trying to route them to / leading to a 404
obviously it's also possible to just give a general you have to name your template directive but as it stands i don't really see a need for it
This commit is contained in:
@ -39,7 +39,7 @@ sudo -u postgres psql -c "CREATE TABLE freelancers(
|
|||||||
sudo -u postgres psql -c "CREATE TABLE templates(
|
sudo -u postgres psql -c "CREATE TABLE templates(
|
||||||
id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||||||
freelancerID int,
|
freelancerID int,
|
||||||
name text,
|
name text NOT NULL,
|
||||||
content text,
|
content text,
|
||||||
contactData text,
|
contactData text,
|
||||||
contactInformation text,
|
contactInformation text,
|
||||||
|
@ -699,7 +699,8 @@ int main(int argc, char *argv[]) {
|
|||||||
if (splitItem.at(0) == "templatepriceondeliver")
|
if (splitItem.at(0) == "templatepriceondeliver")
|
||||||
priceondeliver = splitItem.at(1);
|
priceondeliver = splitItem.at(1);
|
||||||
}
|
}
|
||||||
|
if (name.empty())
|
||||||
|
name = "unnamed";
|
||||||
if (!Utilities::checkIfStrIsNumber(priceupfront))
|
if (!Utilities::checkIfStrIsNumber(priceupfront))
|
||||||
priceupfront = "0";
|
priceupfront = "0";
|
||||||
if (!Utilities::checkIfStrIsNumber(priceondeliver))
|
if (!Utilities::checkIfStrIsNumber(priceondeliver))
|
||||||
|
Reference in New Issue
Block a user