add: service edit date + browser session ids
This commit is contained in:
parent
9aee80493f
commit
cfcc2358f4
17 changed files with 148 additions and 29 deletions
|
@ -16,6 +16,7 @@ impl DataManager {
|
|||
owner: get!(x->2(i64)) as usize,
|
||||
name: get!(x->3(String)),
|
||||
files: serde_json::from_str(&get!(x->4(String))).unwrap(),
|
||||
revision: get!(x->5(i64)) as usize,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,13 +81,14 @@ impl DataManager {
|
|||
|
||||
let res = execute!(
|
||||
&conn,
|
||||
"INSERT INTO services VALUES ($1, $2, $3, $4, $5)",
|
||||
"INSERT INTO services VALUES ($1, $2, $3, $4, $5, $6)",
|
||||
params![
|
||||
&(data.id as i64),
|
||||
&(data.created as i64),
|
||||
&(data.owner as i64),
|
||||
&data.name,
|
||||
&serde_json::to_string(&data.files).unwrap(),
|
||||
&(data.created as i64)
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -128,4 +130,5 @@ impl DataManager {
|
|||
|
||||
auto_method!(update_service_name(&str)@get_service_by_id:FinePermission::MANAGE_USERS; -> "UPDATE services SET name = $1 WHERE id = $2" --cache-key-tmpl="atto.service:{}");
|
||||
auto_method!(update_service_files(Vec<ServiceFsEntry>)@get_service_by_id:FinePermission::MANAGE_USERS; -> "UPDATE services SET files = $1 WHERE id = $2" --serde --cache-key-tmpl="atto.service:{}");
|
||||
auto_method!(update_service_revision(i64) -> "UPDATE services SET revision = $1 WHERE id = $2" --cache-key-tmpl="atto.service:{}");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue