add homekeeper stack

This commit is contained in:
2026-07-06 19:25:38 +02:00
commit 58983e6855
90 changed files with 6816 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
db_actions_list <- function(db, colony_id) {
api_get(db, "/v1/actions", list(colony_id = colony_id))
}
db_actions_get <- function(db, id) {
api_get_one(db, paste0("/v1/actions/", id))
}
db_actions_insert <- function(db, colony_id, date, type, notes = NA, time = NA,
related_colony_id = NA) {
result <- api_post(db, "/v1/actions", list(
colony_id = colony_id,
date = as.character(date),
type = type,
notes = notes,
time = time,
related_colony_id = related_colony_id
))
result$id
}
db_actions_update <- function(db, id, date, type, notes = NA) {
api_put(db, paste0("/v1/actions/", id), list(
date = as.character(date),
type = type,
notes = notes
))
}
db_actions_delete <- function(db, id) {
api_delete(db, paste0("/v1/actions/", id))
}