fix uid
This commit is contained in:
@@ -84,7 +84,7 @@ long WrenchSuggestTasks(CVars in, CVars &out){
|
||||
REQ_STRING(in, "uid", 3, 150, "(.*)");
|
||||
REQ_STRING(in, "title", 3, 150, "(.*)");
|
||||
REQ_STRING(in, "description", 3, 299, "(.*)");
|
||||
|
||||
out["suggested_task_id"] ="0";// we will set if all okay
|
||||
const PGresult *res = pgsql_query("SELECT m.*,mf.uid AS family_uid FROM members m "
|
||||
" LEFT JOIN members_family mf ON mf.family_member_id = m.id "
|
||||
" WHERE m.id=%lu AND m.uid='%s'", member_id, in["uid"].c_str());
|
||||
@@ -94,8 +94,8 @@ long WrenchSuggestTasks(CVars in, CVars &out){
|
||||
map_to_cvars(f, rec);
|
||||
ret = PHP_API_OK;
|
||||
out["status"] = "ACCOUNT FOUND";
|
||||
out = rec;
|
||||
if (rec["family_member_id"] != ""){ // we are sure you are a family now
|
||||
//out = rec;
|
||||
if (rec["family_uid"] != ""){ // we are sure you are a family now
|
||||
|
||||
CVars xx;
|
||||
xx["member_id"] = member_id;
|
||||
@@ -106,9 +106,9 @@ long WrenchSuggestTasks(CVars in, CVars &out){
|
||||
xx["description"].set_valid(true);
|
||||
xx["family_uid"] = rec["family_uid"];
|
||||
xx["family_uid"].set_valid(true);
|
||||
|
||||
|
||||
out["suggested_task_id"] = insert_db_record(DBS_VALID, "members_family_suggesttask", "members_family_suggesttask_id_seq", xx);
|
||||
ret = PHP_API_OK;
|
||||
out["status"] = "OK";
|
||||
}
|
||||
}
|
||||
} catch (bad_parameter) {
|
||||
|
||||
Reference in New Issue
Block a user