mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-04-20 06:54:46 +00:00
add delete resources
This commit is contained in:
parent
2e2cb1b787
commit
3626e5360c
4 changed files with 87 additions and 1 deletions
|
@ -72,6 +72,24 @@ impl ResourceUpdate<u64, User, Success<()>> for Users
|
|||
}
|
||||
}
|
||||
|
||||
impl ResourceDeleteAll<Success<()>> for Users
|
||||
{
|
||||
fn delete_all(_state : &mut State) -> Success<()>
|
||||
{
|
||||
info!("Delete all Users");
|
||||
().into()
|
||||
}
|
||||
}
|
||||
|
||||
impl ResourceDelete<u64, Success<()>> for Users
|
||||
{
|
||||
fn delete(_state : &mut State, id : u64) -> Success<()>
|
||||
{
|
||||
info!("Delete User {}", id);
|
||||
().into()
|
||||
}
|
||||
}
|
||||
|
||||
impl Resource for Users
|
||||
{
|
||||
fn setup<D : DrawResourceRoutes>(mut route : D)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue