diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-11-15 20:00:45 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-11-15 20:00:45 +0100 |
commit | e5ead880579cbac93353b72e96221c84206a7403 (patch) | |
tree | 0f40cdc235a9e75f137fe3ac927f43f263b02826 /src/exchangedb | |
parent | 0325a79631d1abba7fdf414748a34c0e8bca55c3 (diff) | |
download | exchange-e5ead880579cbac93353b72e96221c84206a7403.tar.xz |
complete oauth logic (in theory)
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/exchange-0001.sql | 2 | ||||
-rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql index 439521a72..73a371f3b 100644 --- a/src/exchangedb/exchange-0001.sql +++ b/src/exchangedb/exchange-0001.sql @@ -71,7 +71,7 @@ CREATE TABLE IF NOT EXISTS wire_targets ,h_payto BYTEA NOT NULL CHECK (LENGTH(h_payto)=64) ,payto_uri VARCHAR NOT NULL ,kyc_ok BOOLEAN NOT NULL DEFAULT (FALSE) -,oauth_username VARCHAR +,external_id VARCHAR ,PRIMARY KEY (h_payto) ); COMMENT ON TABLE wire_targets diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 6e77cb232..a5066e883 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -383,8 +383,9 @@ prepare_statements (struct PostgresClosure *pg) "set_kyc_ok", "UPDATE wire_targets" " SET kyc_ok=TRUE" + ",external_id=$2" " WHERE wire_target_serial_id=$1", - 1), + 2), GNUNET_PQ_make_prepare ( "get_kyc_h_payto", "SELECT" @@ -3799,17 +3800,18 @@ postgres_reserves_get (void *cls, * * @param cls the @e cls of this struct with the plugin-specific state * @param payment_target_uuid which account has been checked - * @param ... possibly additional data to persist (TODO) + * @param id external ID to persist * @return transaction status */ static enum GNUNET_DB_QueryStatus postgres_set_kyc_ok (void *cls, uint64_t payment_target_uuid, - ...) + const char *id) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_uint64 (&payment_target_uuid), + GNUNET_PQ_query_param_string (id), GNUNET_PQ_query_param_end }; struct TALER_KycCompletedEventP rep = { |