This commit is contained in:
2025-05-21 22:16:52 -04:00
parent 92926fa8df
commit 392d31cc53
3 changed files with 11 additions and 9 deletions

View File

@ -165,8 +165,9 @@ static bool _tf_ssb_register_app(tf_ssb_t* ssb, const char* user, const char* ap
bool result = false;
sqlite3_stmt* statement;
sqlite3* db = tf_ssb_acquire_db_writer(ssb);
if (sqlite3_prepare_v2(db, "INSERT INTO properties (id, key, value) VALUES (?1, 'path:' || ?2, ?3) ON CONFLICT DO UPDATE SET value = excluded.value WHERE value != excluded.value",
-1, &statement, NULL) == SQLITE_OK)
if (sqlite3_prepare_v2(db,
"INSERT INTO properties (id, key, value) VALUES (?1, 'path:' || ?2, ?3) ON CONFLICT DO UPDATE SET value = excluded.value WHERE value != excluded.value", -1, &statement,
NULL) == SQLITE_OK)
{
if (sqlite3_bind_text(statement, 1, user, -1, NULL) == SQLITE_OK && sqlite3_bind_text(statement, 2, app, -1, NULL) == SQLITE_OK &&
sqlite3_bind_text(statement, 3, id, -1, NULL) == SQLITE_OK && sqlite3_step(statement) == SQLITE_DONE)