router: add upgrade method
This is just an Async GET method, but semantically different, so it gets its own router method. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
80822b95b1
commit
91ebea8262
@ -234,6 +234,10 @@ impl Router {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn upgrade(mut self, m: ApiAsyncMethod) -> Self {
|
||||||
|
self.get = MethodDefinition::Async(m);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
pub fn delete(mut self, m: ApiMethod) -> Self {
|
pub fn delete(mut self, m: ApiMethod) -> Self {
|
||||||
self.delete = MethodDefinition::Simple(m);
|
self.delete = MethodDefinition::Simple(m);
|
||||||
|
Loading…
Reference in New Issue
Block a user