add: response macros
add: preparation for more macro endpoints
This commit is contained in:
parent
9d2c48d645
commit
01ffb1d58d
26 changed files with 482 additions and 353 deletions
src/models
|
@ -94,6 +94,23 @@ macro_action_insert(macro_action_t *macro_action)
|
|||
return rc != SQLITE_DONE;
|
||||
}
|
||||
|
||||
int
|
||||
macro_action_delete_for_macro(int macro_id)
|
||||
{
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
sqlite3_prepare_v2(global_database, "DELETE FROM macro_actions WHERE macro_id=?1;", -1, &stmt, NULL);
|
||||
sqlite3_bind_int(stmt, 1, macro_id);
|
||||
|
||||
int rc = sqlite3_step(stmt);
|
||||
|
||||
sqlite3_finalize(stmt);
|
||||
|
||||
cache_invalidate_macro(macro_id);
|
||||
|
||||
return rc != SQLITE_DONE;
|
||||
}
|
||||
|
||||
macro_action_t**
|
||||
macro_action_get_for_macro(int macro_id)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue