fix entry PUTting
parent
66253fb3e5
commit
471c60c19e
|
@ -9,6 +9,7 @@ use std::io::{Cursor, Write};
|
|||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum InEntry {
|
||||
Entry(Entry),
|
||||
Invariant(InvariantEntry),
|
||||
Address { entity: InAddress },
|
||||
}
|
||||
|
|
|
@ -258,6 +258,14 @@ pub async fn put_object(
|
|||
debug!("PUTting {in_entry:?}");
|
||||
|
||||
match in_entry {
|
||||
InEntry::Entry(entry) => Ok((
|
||||
Some(
|
||||
connection
|
||||
.insert_entry(entry.clone())
|
||||
.map_err(ErrorInternalServerError)?,
|
||||
),
|
||||
entry.entity,
|
||||
)),
|
||||
InEntry::Invariant(in_entry) => {
|
||||
let invariant = Entry::try_from(&InvariantEntry {
|
||||
attribute: in_entry.attribute,
|
||||
|
|
Loading…
Reference in New Issue