market backed added

This commit is contained in:
CHIEFSOFT\ameye
2024-09-15 14:16:34 -04:00
parent 674f6b6d10
commit b4bf4be31f
5 changed files with 61 additions and 1 deletions
+43
View File
@@ -0,0 +1,43 @@
// History Listing
#include "clog.h"
#include "cgi.h"
#include "input.h"
#include "wrenchboard_api.h"
#include "history.h"
#include "market.h"
#include "email.h"
#include "payments.h"
#include "safestring.h"
#include <string>
#include "pgsql.h"
#include "pgsql_wrapper.h"
#include "cfg.h"
#include <curl/curl.h>
long market_calls(CVars in, CVars &out) {
logfmt(logINFO, "market_calls()");
long ret = PHP_API_BAD_PARAM;
char vname[700];
char file_section[50];
try {
long action = REQ_LONG( in, "action", 1, -1 );
switch(action){
case WRENCH_FILE_PROFILE:
//file_uid is the UID of the user
snprintf(vname, sizeof (vname), "SELECT uid AS member_uid, profile_pic AS saved_file_name FROM members WHERE uid ='%s'", in["file_uid"].c_str());
break;
}
if ( load_db_record(out, "%s", vname) > 0){
ret = PHP_API_OK;
}
} catch (bad_parameter) {
logfmt(logINFO, "ERROR CALL long market_calls(CVars in, CVars &out)");
}
logfmt(logINFO, "/market_calls()");
return ret;
}
@@ -23,6 +23,7 @@
#include "cards.h"
#include "family_acc.h"
#include "media.h"
#include "market.h"
#include "twilo.h"
//extern CSQL *sql;
@@ -113,6 +114,10 @@ long wrenchboard_api_main(CVars in, CVars &out) {
return mobile_calls(in, out);
}
if (action >= WRENCHBOARD_MARKET_START && action <= WRENCHBOARD_MARKET_END) {
logfmt(logINFO, "market_calls");
return market_calls(in, out);
}
if (action >= WRENCHBOARD_CONTRACT_START && action <= WRENCHBOARD_CONTRACT_END) // i could have used Jobs - but searated it for larger thinking
{