pub fn post<'m>(args: Args<'m>) -> Result<()> {
    let conn = database_connection()?;

    let key = args
        .params
        .get("key")
        .ok_or("Unable to retrieve param: key")?;

    let value = args
        .params
        .get("value")
        .ok_or("Unable to retrieve param: value")?;

    diesel::insert_into(tags::table)
        .values((tags::key.eq(key), tags::value.eq(value)))
        .execute(&conn)?;

    Ok(())
}
/// Add a key value pair to the tags.  
Add a key value pair to the tags.
Add a key value pair to the tags .
pub fn post<'m>(args: Args<'m>) -> Result<()> {
    let conn = database_connection()?;
    let key = args
        .params
        .get("key")
        .ok_or("Unable to retrieve param: key")?;
    let value = args
        .params
        .get("value")
        .ok_or("Unable to retrieve param: value")?;
    diesel::insert_into(tags::table)
        .values((tags::key.eq(key), tags::value.eq(value)))
        .execute(&conn)?;
    Ok(())
}
pub fn post < ' m > ( args : Args < ' m > ) -> Result < ( ) > { let conn = database_connection ( ) ? ; let key = args . params . get ( " " ) . ok_or ( " " ) ? ; let value = args . params . get ( " " ) . ok_or ( " " ) ? ; diesel :: insert_into ( tags :: table ) . values ( ( tags :: key . eq ( key ) , tags :: value . eq ( value ) ) ) . execute ( & conn ) ? ; Ok ( ( ) ) }
Add a key value pair to the tags.
Add a key value pair to the tags .
args
Args<'m>
args
Args<'m>