This commit is contained in:
2022-08-20 18:09:44 -04:00
parent 26845635b2
commit 884aacb903
+5 -4
View File
@@ -1140,10 +1140,11 @@ long WrenchSendReferLoadLink(CVars in, CVars &out) {
logfmt(logINFO, "long WrenchSendReferLoadLink(CVars in, CVars out)");
long ret = PHP_API_BAD_PARAM;
try {
REQ_STRING(in, "refer_link", 3, 150, "(.*)");
REQ_STRING(in, "refer_link", 3, 45, "(.*)");
if (load_db_record(out, "SELECT uid FROM members_refer_friend WHERE updated IS NULL AND refer_link ='%s'", in["refer_link"].c_str()) > 0)
{
const PGresult *res = pgsql_query("UPDATE members_refer_friend SET updated=now() WHERE uid='%s'", out["uid"].c_str());
}
} catch (bad_parameter) {
out["status"] = "Invalid Parameters";