This commit is contained in:
2022-11-05 09:38:33 -04:00
parent 7abf541bce
commit 7284c1d318
2 changed files with 9 additions and 5 deletions
+7 -3
View File
@@ -127,7 +127,7 @@ long WrenchMarketInterestQuestion(CVars in, CVars &out) {
long ret = PHP_API_BAD_PARAM;
out = in;
try {
out["status"] = "Recieved";
out["status"] = "0";
long member_id = REQ_LONG(in, "member_id", 1, -1);
long interest_id = REQ_LONG(in, "interest_id", 1, -1);
@@ -181,7 +181,7 @@ long WrenchJobsQuestion(CVars in, CVars &out) {
long ret = PHP_API_BAD_PARAM;
//out = in;
try {
out["status"] = "Recieved";
out["status"] = "Started";
long member_id = REQ_LONG(in, "member_id", 1, -1);
REQ_STRING(in, "yourmessage", 1, 500, "(.*)"); //offer_code
REQ_STRING(in, "offer_code", 1, 15, "(.*)"); //offer_code
@@ -208,14 +208,18 @@ long WrenchJobsQuestion(CVars in, CVars &out) {
x["memo"].set_valid(true);
long msg_id = insert_db_record(DBS_VALID, "members_messages", "members_messages_id_seq", x);
if (msg_id > 0) {
x["status"] = "Sent";
x["msg_id"] = msg_id;
x["msg_id"].set_valid(true);
//x["offer_id"] = out["offer_id"];
//x["offer_id"].set_valid(true);
job_email(WRENCHBOARD_JOB_SEND_QUESTION, x, out);
}
else{
x["status"] = "Error";
}
out = x;
out["status"] = "";
//out["status"] = "";
}
}