summaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_insert_kyc_requirement_process.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-11-12 14:18:06 +0100
committerChristian Grothoff <christian@grothoff.org>2023-11-12 14:18:06 +0100
commitac8144bb553605ef310962d152cf4cad4338f51f (patch)
tree32140966210d4ac59d15f18fb83fce3ac790258e /src/exchangedb/pg_insert_kyc_requirement_process.c
parentefb7a46b786807994a66040f2d9c831e790b92a1 (diff)
downloadexchange-ac8144bb553605ef310962d152cf4cad4338f51f.tar.gz
exchange-ac8144bb553605ef310962d152cf4cad4338f51f.tar.bz2
exchange-ac8144bb553605ef310962d152cf4cad4338f51f.zip
keep redirect_url in KYC table to improve idempotency of GET
Diffstat (limited to 'src/exchangedb/pg_insert_kyc_requirement_process.c')
-rw-r--r--src/exchangedb/pg_insert_kyc_requirement_process.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/exchangedb/pg_insert_kyc_requirement_process.c b/src/exchangedb/pg_insert_kyc_requirement_process.c
index 97b82eff6..a20db3388 100644
--- a/src/exchangedb/pg_insert_kyc_requirement_process.c
+++ b/src/exchangedb/pg_insert_kyc_requirement_process.c
@@ -36,8 +36,11 @@ TEH_PG_insert_kyc_requirement_process (
uint64_t *process_row)
{
struct PostgresClosure *pg = cls;
+ struct GNUNET_TIME_Absolute now
+ = GNUNET_TIME_absolute_get ();
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (h_payto),
+ GNUNET_PQ_query_param_absolute_time (&now),
GNUNET_PQ_query_param_string (provider_section),
(NULL != provider_account_id)
? GNUNET_PQ_query_param_string (provider_account_id)
@@ -53,20 +56,16 @@ TEH_PG_insert_kyc_requirement_process (
GNUNET_PQ_result_spec_end
};
- /* Used in #postgres_insert_kyc_requirement_process() */
PREPARE (pg,
"insert_legitimization_process",
"INSERT INTO legitimization_processes"
" (h_payto"
+ " ,start_time"
" ,provider_section"
" ,provider_user_id"
" ,provider_legitimization_id"
" ) VALUES "
- " ($1, $2, $3, $4)"
- " ON CONFLICT (h_payto,provider_section) "
- " DO UPDATE SET"
- " provider_user_id=$3"
- " ,provider_legitimization_id=$4"
+ " ($1, $2, $3, $4, $5)"
" RETURNING legitimization_process_serial_id");
return GNUNET_PQ_eval_prepared_singleton_select (
pg->conn,